PDA

View Full Version : loading a movie after one is already done


mrand01
10-20-2003, 03:05 PM
vidLoader_mc.onEnterFrame = function() {
trace("frame");
}
vidLoader_mc.loadMovie("intro.swf");


the trace statement only executes once, which I find kind of odd, considering intro.swf has 54 frames. Also, how can I call an event when intro.swf is over if I don't have the intro.fla?

CyanBlue
10-20-2003, 03:13 PM
Howdy... ;)

As soon as this line gets executed, vidLoader_mc.loadMovie("intro.swf");, whatever were within the vidLoader_mc get wiped out including the onEnterFrame handler to make a room for whatever is going into that movieclip... That's why you only see it once... ;)

mrand01
10-20-2003, 03:27 PM
so how do I make this work, I know its possible, I have a project in front of me that does it, unfortunatly, its all swfs and exes, and I can't see the code inside of em (the exe atleast...)

CyanBlue
10-20-2003, 03:37 PM
Um... What is your question??? What is it you want to achieve??? :confused:

mrand01
10-20-2003, 05:30 PM
Originally posted by mrand01
Also, how can I call an event when intro.swf is over if I don't have the intro.fla?

CyanBlue
10-21-2003, 04:58 AM
Hm... I said 'what' not 'where'... :(

I wouldn't have asked that question again if I was able to understand what you have meant by that... :(

Hope somebody who understand your question will give you some answers... ;)

oldnewbie
10-21-2003, 12:20 PM
Best would be the put the onEnterFrame function on the clip itself, or at least not on the same frame the intro.swf is loaded.

Thus to check the current frame of intro.swf, put this on the clip vidLoader_mc itself...


onClipEvent (enterFrame) {
trace(_root.vidLoader_mc._currentframe);
}


You can then add some other action when intro.swf finishes...


onClipEvent (enterFrame) {
trace(_root.vidLoader_mc._currentframe);
if (_root.vidLoader_mc._currentframe >= 54){
_root.vidLoader_mc.stop();
// Or any other action... Like loading another movie or whatever.
}
}

CyanBlue
10-21-2003, 12:46 PM
Dang... That's what he meant???

Good job, oldnewbie... ;)

I guess I'll have to go back to the English comprehension classes... Lots of them... :(

oldnewbie
10-21-2003, 01:08 PM
;)