i´m trying to place a loader content (an swf which is an instance of the class "Nav") into a movieclip (so i can easily refer to its variables, for example, width) but when i trace the movieclip it throws null. why ?
i´d like to later in the code do this:Code:private function doneNav(e:Event):void { trace (navLoader.content); // [Object Nav]. fine! nav = navLoader.content as MovieClip; // null. why?? trace (navLoader.getChildAt(0)); // [Object Nav]. fine! nav = navLoader.getChildAt(0) as MovieClip; // null. why??
what are the best practices in loading swfs?Code:nav.x = (stage.stageWidth - nav.width)/2;
thanks!




Reply With Quote
