I have did a search before posting this, but could not find a simple answer to my problem.
I have developed a “player” shell SWF file. It is only 1 frame long and has AS3 script inside. The purpose of this “shell” is to:
get a string from my ASP page via flashvars [COLOR=DarkGreen](NO PROBLEM)[/COLOR]
read an external SWF file with the filename = string passed in [COLOR=DarkGreen](NO PROBLEM)[/COLOR]
place it on the stage OR inside a newly created MovieClip and then place that on stage [COLOR=DarkGreen](NO PROBLEM)[/COLOR]
trying to figure out when the imported SWF finished playing [COLOR=Red](PROBLEM)[/COLOR]
The external SWF is a simple file that has some animations on its timeline and a stop() command on its last frame.
[COLOR=Red]**QUESTION: How do I access the properties of the imported SWF, like the number of frames? :stare:
Thank you in advance!
Here is the code I have so far:
[FONT=Courier New][COLOR=Navy]import flash.display.;
var f:String = “ball.swf”;
var loader:Loader = new Loader();
var swfContainer= new MovieClip();
swfContainer.name = “swfContainer”;
var request:URLRequest = new URLRequest(f);
var loaderInfo:LoaderInfo = event.target as LoaderInfo;
var swf:Object = loaderInfo.content;
swfContainer.addChild(loader) swfContainer.addEventListener(Event.ENTER_FRAME, containerHandler);
// something will happen here
// check if the currentFrame = totalFrames
// not yet implemented
// start the show