# Button(mc) containing externally loaded text, with rollover

**URL:** <https://forum.kirupa.com/t/button-mc-containing-externally-loaded-text-with-rollover/83985>\
**Category:** flash\
**Created:** [March 23, 2005, 7:39pm UTC](https://forum.kirupa.com/t/button-mc-containing-externally-loaded-text-with-rollover/83985 "2005-03-23T19:39:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Baeshin](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@Baeshin](https://forum.kirupa.com/u/Baeshin)\
**Post date:** [March 23, 2005, 7:39pm UTC](https://forum.kirupa.com/t/button-mc-containing-externally-loaded-text-with-rollover/83985/1 "2005-03-23T19:39:55Z")

</div>

Hi,

My goal is to create a MC which behaves like a button. The button  
contains a dynamic textbox which displays an externally loaded  
text. On a mouseOver it should display (via a frame as) the assigned  
mouseOver text.

I use this code:

```auto

loadText = new LoadVars();
loadText.load("pagina1.txt");
loadText.onLoad = function() {
	link1.link01.text = this.link01;
	link2.link02.text = this.link02;
};

link1.onRollOver = function() {
	link1.link01Hover.text = this.link01Hover;
}

link1.onRollOut = function() {
	link1.link01.text = this.link01;
}

link2.onRollOver = function() {
	link2.link02Hover.text = this.link02Hover;
}

link2.onRollOut = function() {
	link2.link02.text = this.link02;
}

stop();
	
	

```

When I test mc link01 in the movie, the textbox shows on a mouseOver:

\_level0.link1.link01Hover

on a mouseOut:

\_level0.link1.link01

It should be:  
mouseOver  
pagina01 1111111 hover link01!

mouseOut  
pagina1 link01

Same goes for the other link.

I’m a bit stuck here. I want to make these buttons for a gallery  
which has 260 images. The titels of these images are also  
functioning as buttons.  
The way these buttons are made should give me only work  
in creating the text files. (hopefully it gives me less physical work :))

Thank you in adv,

Baeshin
