ok, I have a container movie that into which I load swf files using the loadMovie() method - when the swf I loaded finishes, I want the container to load another swf… how can I do that?
On the last frame of the loaded movie have _root.containerClip.loadMovie(“newMovie.swf”)
see… I dont want to do that. First of all, I only have the swf files of the movies, and I want to be able to choose a random swf after… Is there a way of knowing when the swf is done?
use an onEnterFrame event to check for
container._currentframe == container._totalframes
when that happens load the new movie
*Originally posted by senocular *
**use an onEnterFrame event to check for
container._currentframe == container._totalframes
when that happens load the new movie **
Yeah I was going to mention that, but I figured if it was a set .swf (wasn’t mentioned as random in the first post) then it would be more efficient to throw it on the last frame. That way there wouldn’t be an onEnterFrame checking constantly and using up CPU resources.
Make any sense or was I being
*Originally posted by lostinbeta *
Yeah I was going to mention that, but I figured if it was a set .swf (wasn’t mentioned as random in the first post) then it would be more efficient to throw it on the last frame. That way there wouldn’t be an onEnterFrame checking constantly and using up CPU resources.
I would have a setInterval instead of an onEnterFrame! And the way does work efficiently Lost! You can also use onEnterFrame and delete it when the specified file is loaded, And it won’t use up cpu resources so much.
thanks, I’ll try that… tomorrow morning… I’ve been coding all day, and I’m exhausted. If you want to know why I was asking, check this site: http://web.mit.edu/lavaboy/www/newsite.html
the songs that play are the swfs… they’re from my old site, and I wanted to use them.
thanks
*Originally posted by h88 *
**I would have a setInterval instead of an onEnterFrame! And the way does work efficiently Lost! You can also use onEnterFrame and delete it when the specified file is loaded, And it won’t use up cpu resources so much. **
h88… I didn’t say it wasn’t efficient at all. I was just saying that IF it WASN’T random would it be more efficient to be running an onEnterFrame to repeatedly check the frame or to just add the code on the last frame of your loaded movie?
wink wink :flower: <— AHHHHHH!!!
*Originally posted by lostinbeta *
would it be more efficient to be running an onEnterFrame to repeatedly check the frame or to just add the code on the last frame of your loaded movie?
FOR ME, i stopped using Frame Events (Depends on the situation sometimes :P) Your right, this will save resources (“frame of your loaded movie”), but it’s actually not practical. I like controling everything from one point!
Well not everyone can code like a genius
But at least you agree with the saving resources (although you stated its not practical, you still agreed).
That makes me happy