Jump to content
Search Community

Sequence of swf's - can I do this with LM

rojharris test
Moderator Tag

Recommended Posts

Hi All,

 

Bear with me please, I'm a newbie!

Before I try to work out how to use LoaderMax to do something, I wonder if you could tell me if it's even possible? I'm new to AS and loving TweenLite but now I need to do something more complex:

 

I have a series of short swfs (11) each with a presentation about part of a product. Each one has about 100 frames of embedded movie animation and some text boxes that pop up describing the movie. Each swf is about 1MB in size and lasts from 20-30seconds. I figured that rather than make a huge swf file with all 11 parts in and try and play that (with the long load times that would entail) I would make the 11 small swfs and load and play them in sequence from within a 'host' swf.

 

That way I can add some music to the host swf to play, while the viewer watched each section play. I'd like the experience to be seamless to the viewer, so for eg. part1.swf would load and start playing then, as soon as its finished, part2.swf would begin playing. etc. etc. until part11.swf has finshed. You get the picture...

 

So, will Loadermax allow me to do this so each one comes in without having to wait for the whole lot to load? Perhaps can they all load in the background while the viewer is watching? So while part 1 is being viewed, part 2 is already loading up ready?

I have no idea how to do this in AS3 but if LoaderMax can do it I know it will be much easier to use, just like TweenLite is?

 

I have to decide which way to go with this very soon as I'm making all the animations this week. My alternative would be to make the whole sequence, music included, as a long flv movie and just play it from one swf. That's easier but I'm worried it will load slower and also, the text will look awful due to the movie compression.

 

Any help from you master coders out there would be very much appreciated.

Many thanks, Roger

Link to comment
Share on other sites

Sure, LoaderMax can help with this. It will allow you do to exactly what you said - load the first swf, then while that is playing, it can be loading the next one in the background, etc. However, it would be virtually impossible to absolutely guarantee a seamless playback of all 11 in a row without any gap. For example, let's say the first swf is 2MB and takes 100 seconds (just an example) so that's 0.02 MB per second in terms of loading. Let's say the 2nd one is 10MB for just 10 seconds - that's 1MB per second to load. That would mean that there's a very good chance that the first one would finish playing BEFORE the second one was fully downloaded and ready to play. The same thing would happen if there was a problem with the user's internet connection or your server's load while the 2nd one was loading. In that case, you'd need to introduce a little preloader animation or something that would play between 1 and 2 while the second one finishes loading.

 

See what I mean?

 

If your stuff is pretty consistent in terms of size and duration, though, it will probably play back just fine without any gaps. I just wanted to make sure I made you aware of the risks.

 

A hybrid solution would be to do one big FLV that streams but you do your text/graphic animation using real text in Flash and you utilize cue points to trigger when your text shows up and animates. This would be a bigger challenge to produce but might be a nice solution if you have mostly video but want text animations to look razor sharp (no video compression artifacts). LoaderMax's VideoLoader class offers the ability to add cue points via ActionScript. So you can say, for example, when the video hits exactly 2.1 seconds, call this function (which does some text animation or whatever). Just an idea.

 

There's a tutorial about VideoLoader at http://active.tutsplus.com/tutorials/ac ... e-premium/ in case it's helpful.

 

There are also some video tutorials covering LoaderMax that I'll be posting soon that were done by Rich Shupe. Keep an eye on the greensock.com site for those.

Link to comment
Share on other sites

Thanks for the reply. I hadn't thought of using cuepoints and flash text over a movie, that's a good idea. It may be a little beyond my experience but I'll have a look at some tuts on triggering events via cuepoints.

 

As for your loading point, I'm hoping that each section swf will be no larger than 1MB. 1.5 at absolute most, so hopefully they would load fairly quickly. At least faster than it would take to watch one.

I'll see if I can work out LoaderMax and give it a try.

 

Many thanks

Roger

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...