# Cannot get loadMovie to work from buttons in a movieclip

**URL:** <https://forum.kirupa.com/t/cannot-get-loadmovie-to-work-from-buttons-in-a-movieclip/159987>\
**Category:** flash\
**Created:** [August 22, 2005, 3:59pm UTC](https://forum.kirupa.com/t/cannot-get-loadmovie-to-work-from-buttons-in-a-movieclip/159987 "2005-08-22T15:59:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcline](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@bcline](https://forum.kirupa.com/u/bcline)\
**Post date:** [August 22, 2005, 3:59pm UTC](https://forum.kirupa.com/t/cannot-get-loadmovie-to-work-from-buttons-in-a-movieclip/159987/1 "2005-08-22T15:59:14Z")

</div>

Okay, so I have a sub button menu in an already externally loaded swf which when clicked loads another external movie in a different movie clip and at the same time attachs another set of buttons in their own movie clip which are the ones that I am having trouble with. I am able to target the other external movie clip behaviors, however, I am unable to load a external swf into what would be a \_parent.\_parent.empty\_mc. I know, theres probably a lot easier of a way of doing this, but works fine until I put the code into buttons in movie clip.

```auto
caps_3.onRelease = function () {
	caps_1over._alpha=0;
	caps_2over._alpha=0;
	caps_3over._alpha=100;
	var unload_mc:Function = new Function(_parent._parent.pic.unloadMovie());
	new Tween(_parent._parent.pic_backround, "_xscale", Elastic.easeOut, 300, 310, 1, true);
	var pic_backround_tween:Object = new Tween(_parent._parent.pic_backround, "_yscale", Elastic.easeOut, 300, 334, 1, true);
	_parent._parent.pic_backround_tween.onMotionFinished = function () {
		_parent._parent.pic._alpha=100;
		_parent._parent.pic._x = _parent._parent.pic_backround._x-150;
		_parent._parent.pic._y = _parent._parent.pic_backround._y-162;
		_parent._parent.pic.loadMovie("caps/3.swf");
	};
}

```

everything is working perfectly fine except for the last part when I try to load the Movie…it won’t load. Next is the example code which works perfectly on the main timeline of this swf which is almost identical to the above code.

```auto
caps_btn.onRelease = function () {
	sub_mc.attachMovie('caps_buttons','caps_sub',getNextHighestDepth());
	var unload_mc:Function = new Function(pic.unloadMovie());
	new Tween(pic_backround, "_xscale", Elastic.easeOut, 300, 310, 1, true);
	var pic_backround_tween:Object = new Tween(pic_backround, "_yscale", Elastic.easeOut, 300, 326, 1, true);
	pic_backround_tween.onMotionFinished = function () {
		Math.round(pic._x,pic_backround._x);
		Math.round(pic._y,pic_backround._y);
		pic._alpha=100;
		pic._x = pic_backround._x-150;
		pic._y = pic_backround._y-158;
		pic.loadMovie('caps/1.swf', getNextHighestDepth());
	};
}

```

ignore…the getNe xtHighestDepth on last bit of code…it doesn’t actually have that space in the actual code, it just printed like that with code tags.

Please any suggestions to relieve this problem would be greatly appreciated…thank you.
