Ok... I feel like an idiot. Although I've been working with AS3 since the start... and for the life of me I can't seem to access a movie clip instance inside a loaded SWF! I've searched high and low. Help is much appreciated.
Here's what I have: An external SWF named map.swf. Inside that is a movie clip instance named "portland_mc". Here's my code that doesn't work:
Again, any help is appreciated.
private var _mapLoader :Loader;
private var _mapLoaded :Boolean = false;
private var _myMap :MovieClip = new MovieClip();
public function LoadMap() :void
_mapLoader = new Loader();
function DoneLoading(evt :Event) :void
trace("Done loading map!");
_mapLoaded = true;
_myMap = MovieClip(_mapLoader.content);
_myMap.portland_mc.gotoAndStop(1); // doesn't work!!!!
function ErrorLoading(evt :Event) :void
trace("Error! - Could not load external map SWF file!");
// Assume the nav button event has been declared and bound to this handler
public function MapButtonOnClick(evt :MouseEvent) :void
// Make sure map content is loaded
// Play animation of portland_mc (a MC instance inside the loaded SWF)
_myMap.portland_mc.gotoAndPlay(2); // doesn't work either!!!!