PDA

View Full Version : External movie loads...next movie doesn't



jasarius
February 9th, 2005, 12:07 AM
Hello to all.

I have a modular movie format. All movies load into a shell/base movie. I have a video intro that loads into the loader component in an external movie. This movie in turn loads into the actual main movie.

What I'm trying to figure out is when the video intro gets done playing, I want it to move to the the next frame (#3) so it can run a behavior I have there to load another movie in its place.

I've tried the "on complete" with several variations to no avail.

I have a button that will move you to the frame #3, but I want to make it happen automatically if I could.

You can see what I mean at Flashbacks Dance Club (http://www.flashbacksdanceclub.com).

Thanks.

tofuisonmyside
February 9th, 2005, 02:54 AM
hi jasarius,
my suggestion is not very elegant, but you could make an onEnterFrame control to check if the _currentframe is equal to _totalframes for the video movieclip container and _totalframes not equal to 1, and if it is, goto frame 3 and delete the onEnterFrame
tofu.

2nd day
February 9th, 2005, 05:33 AM
maybe some actionscript on the last frame of your movie... _root.gotoAndPlay(3); ?
or is it an external movie?

good luck :cowboy:

jasarius
February 11th, 2005, 10:08 AM
Thanks. It's an external movie. I'm not really worried about elegant as long as it works. :)

How would I do the "onEnterFrame?"

tofuisonmyside
February 11th, 2005, 11:56 AM
something like



_root.onEnterFrame = function(){
if (clip.getBytesLoaded() == clip.getBytesTotal() && clip.getBytesLoade >4){
this.gotoAndStop(3)
}
}

2nd day
February 11th, 2005, 03:35 PM
as long as it is an swf you could use this code for the last frame of the movie: _level0.gotoAndPlay(3); ... i think that's an better solution than the EnterFrame because enterframe uses a lot of cpu...

jasarius
February 11th, 2005, 06:39 PM
Thanks for the replies, I'll see what works best for me and I'll let you know the results.

Kirupa Rocks! :book:

jasarius
February 18th, 2005, 09:10 PM
Okay, I'm back...I can't believe I actually understand "onEnterFrame!"

Sort of. :)

Okay, here's the thing I didn't mention though. I have actual video that I export into a swf file so its not editable without importing it into yet another swf and I'm trying to keep things fairly simple.

That video swf is loaded into the "loader" component. So really I'm dealing with how do I tell the loader component that after it has played the file to unload itself (or at least that movie) and load another one.

Have a great weekend, thanks.

jasarius
February 18th, 2005, 10:18 PM
Okay...right now I've just imported the .swf as a .flv and then just added the code at the end, but I don't like doing it this way because the file is huge...dial-ups stand no chance at all and broadband it still takes over a minute or too.

Any recommendations? Maybe how can I have it stream instead of loading the whole thing?

Back to the drawing board... :tired: