Control of externally loaded child movieclip timeline from parent
So I've spent the last couple of days digging around on this, hope someone here can help.
I have a basic xml driven portfolio. The xml file holds the path to the portfolio pieces (external .swfs). I have a main navigation that moves from project to project and a subnavigation to view individual pages of that project.
The subnav is where I have the problem, I simply want to call gotoAndPlay("framelabel") of the designated mc. It seems that you can no longer call to the timeline of child movieclips as you could with AS 2. I've found some examples such as (http://code.google.com/p/as3-display-list-library/) that kind of help. Except the examples discuss access of nested movieclips on the stage with assigned instance names.
But the problem I'm facing is that I have each item pulled in via the loader Class then the objects are pushed into an array and my subnav needs to access them dynamically via array notation.
something like this:
PHP Code:
public function loadMe(){
//var l:Loader = new Loader();
l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
for (var a:int = 0; a < xmlParser.Images.length; a++){
myRequest = new URLRequest(xmlParser.Images[a]);
l.load(myRequest, myContext);
loadArray.push(l);
}
}
then later where my subNav is called I thought it would be something like:
PHP Code:
function subFwd(e:MouseEvent):void{
trace("getClickedWithIt: "+_nr);
trace("loader array "+loadArray[_nr]);
MovieClip(loadArray[_nr].content).gotoAndPlay("screen_1");
}