# \[F8 AS2\] MovieClipLoader kills button rollovers

**URL:** <https://forum.kirupa.com/t/f8-as2-moviecliploader-kills-button-rollovers/202952>\
**Category:** flash\
**Created:** [October 6, 2006, 1:59am UTC](https://forum.kirupa.com/t/f8-as2-moviecliploader-kills-button-rollovers/202952 "2006-10-06T01:59:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackstrat](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blackstrat/32/2890_2.png) [@blackstrat](https://forum.kirupa.com/u/blackstrat)\
**Post date:** [October 6, 2006, 1:59am UTC](https://forum.kirupa.com/t/f8-as2-moviecliploader-kills-button-rollovers/202952/1 "2006-10-06T01:59:41Z")

</div>

I’m writing an image gallery and dynamically loading images and buttons. Almost everything is working out, but I’m having a problem: dynamically loaded buttons show their rollover actions just fine, but when when I use onLoadInit to attach an action to the button, the action works, but the button’s rollover quits working.

With this code, the button’s actions work:

```auto
// load a single main navigation button
function load_main_nav(clip_name,clip_url,clip_depth,clip_position,section_name) {
	this.createEmptyMovieClip(clip_name, clip_depth);
	var the_listener_name:Object = new Object();
	the_listener_name.onLoadInit = function(target_mc:MovieClip) {
		target_mc._x = 0 - 140;
		target_mc._y = clip_position;
		new mx.transitions.Tween(target_mc,"_x",mx.transitions.easing.Regular.easeOut,target_mc._x,0,2,true);
		target_mc.onRelease = function() {
			the_section = section_name;
			trace(section_name);
		}
	}
	var clip_loader:MovieClipLoader = new MovieClipLoader();
	clip_loader.addListener(the_listener_name);
	clip_loader.loadClip(clip_url,clip_name);
}

```

If I comment out the button action like this, the rollover works:

```auto
// load a single main navigation button
function load_main_nav(clip_name,clip_url,clip_depth,clip_position,section_name) {
	this.createEmptyMovieClip(clip_name, clip_depth);
	var the_listener_name:Object = new Object();
	the_listener_name.onLoadInit = function(target_mc:MovieClip) {
		target_mc._x = 0 - 140;
		target_mc._y = clip_position;
		new mx.transitions.Tween(target_mc,"_x",mx.transitions.easing.Regular.easeOut,target_mc._x,0,2,true);
// target_mc.onRelease = function() {
// the_section = section_name;
// trace(section_name);
// }
	}
	var clip_loader:MovieClipLoader = new MovieClipLoader();
	clip_loader.addListener(the_listener_name);
	clip_loader.loadClip(clip_url,clip_name);
}

```

I’m nearly done with this project, but I’m stumped on this one. Can anyone help?  
Thanks in advance
