Question : Movieclip levels

Hello all

Essentially, I'm trying to get a swf to load into an empty movieclip (called mc_info), which is nested within a movieclip sitting on the root level (called menu_mc). The button to activate this (called btn1) is nested 2 levels deep within another movieclip on the root level.

I think the old AS2 way was

_parent._parent.mc_menu.mc_info(loadMovieclip "someMC.swf", 1);

or use (the often frowned upon) _root.

I've tried using MovieClip(parent) but this method doesn't seem to be working.

Any help would be much obliged, as I say I'm a designer dipping into and attempting to learn AS3, but the old cogs aren't turing quite yet.


Answer : Movieclip levels


Have you tried using MovieClip(root)? i.e MovieClip(root).menu_mc ? You can specify which movieclip you need and use a loader to get the swf.

Something like -

var loadedSwf:MovieClip;
var ldr:Loader
var url:URLRequest = new URLRequest("dir/swfName.swf");

ldr.contentLoaderInfo.addEventListener( Event.COMPLETE, this.swfLoadedHandler );

function swfLoadedHandler(e:Event):void

Good Luck,

Random Solutions  
programming4us programming4us