|
-
Designer, Programmer, Musician
FKLL7, your script also do the trick, but it has a flaw, and maybe our friend trnghosh could have problems.
It needs a closing bracket at the end
PHP Code:
var mcl:MovieClipLoader = new MovieClipLoader(); var mclListener: Object = new Object(); mclListener.onLoadInit = function(target_mc: MovieClip) { target_mc.onEnterFrame = function() { if (this._currentframe == this._totalframes) { delete this.onEnterFrame; this.stop(); trace("do this"); }; }; }; //[B]this one[/B] mcl.addListener(mclListener); mcl.loadClip("main.swf", container_mc);
I tested it on a new FLA, and it works great. I created a simple tween animation, exported it to .swf, and loaded it with your script in a new fla, and then the
loaded swf reaches its end, it do the action, in this case i used a trace, but in our friend's case is the getURL. Good job
 Already mastering AS3. It was so fun. Now into Javascript and PHP and all its libraries 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|