-
First time caller... Long time listener.
I have a SWF created via Sorenson Spark Pro, I'm using loadMovie to load it into my Flash file. How can I detect when the loaded SWF is done playing? I obviously can't crack open the SWF and add actionscript, so I need a way to detect when it's done.
Any ideas?
Thanks in advance...
-jaz
-
Hi.
You can use get property to tell you how many total frames are in the movie you have loaded. Then you can compare how many frames have played against the total. When those numbers are equal, you know that your swf is done playing.
FYI, our software, Flix, adds a variable at the end of each swf to let you know when it is done playing.
jb
http://www.wildform.com/flix
-
I understand the getProperty part, that's easy. But I'm not very good with loops. How would the logic look?
Is it like this?
if (_currentframe = _totalframes) {
do something()
}
And, where does it need to go? I placed my getProperty within an onClipEvent(), on the MC that loads the SWF, and it works. I'm just not sure where to put the other logic.
Any Ideas?
Thanks in advance...
-Jaz
-
Flash Video Moderator
<b>// on a MC</b>
on(press){
loadMovie("mySwf", 4000);
}
<b>// dynamic</b>
mc.onPress = function() {
loadMovie("mySwf", 4000);
}
<b>// on a MC</b>
onClipEvent(enterFrame){
if(_level4000._currentframe==_level4000._totalfram es)
doSomething;
}
}
<b>// dynamic</b>
mc.onEnterFrame = function() {
if(_level4000._currentframe==_level4000._totalfram es){
doSomething;
delete this.onEnterFrame;
}
}
http://www.tcinternet.net/users/5guy...08/final3.html
5G
[Edited by Wheels on 08-16-2002 at 04:10 AM]
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
|