# Loading dynamic text using on(release) in movie clip?

**URL:** <https://forum.kirupa.com/t/loading-dynamic-text-using-on-release-in-movie-clip/55369>\
**Category:** flash\
**Created:** [June 23, 2004, 10:43am UTC](https://forum.kirupa.com/t/loading-dynamic-text-using-on-release-in-movie-clip/55369 "2004-06-23T10:43:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![redrum87](https://avatars.discourse-cdn.com/v4/letter/r/f04885/32.png) [@redrum87](https://forum.kirupa.com/u/redrum87)\
**Post date:** [June 23, 2004, 10:43am UTC](https://forum.kirupa.com/t/loading-dynamic-text-using-on-release-in-movie-clip/55369/1 "2004-06-23T10:43:47Z")

</div>

Hey all,

I’m making a site in Flash MX, and I have dynamic text boxes so that the data can be easily changed. For navigation I’m using rollover buttons.

My rollover buttons are actually movie clips. I don’t like to use buttons for rollover animations because when you roll off of them, they jump back to their normal state without a smooth transition. This doesn’t look too good.

When a user navigates the site and clicks, I want the rollover buttons to load up dynamic text in 2 different boxes (header and content) from a .txt file on the server.

I did this successfully with regular buttons, but for some reason, the exact same actionscript doesn’t work with the movieclips. How come? I did this from a [tutorial on this site](http://www.kirupa.com/developer/mx/multiple_dynamictext.htm). Heres my code for the movie clips:

```auto
 on (rollOver) {
this.gotoAndPlay("roll_on");
}
on (rollOut) {
this.gotoAndPlay("roll_off");
}
on (release) {
	loadText = new loadVars();
	loadText.load("contactContent.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			scroller.html = true;
			scroller.htmlText = this.contactContent;
		}
	};
	loadText = new loadVars();
	loadText.load("contactHeader.txt");
	loadText.onLoad = function(success) {
		if (success) {
			// trace(success);
			header.html = true;
			header.htmlText = this.contactHeader;
		}
	};
}

```

Thanks for your help!
