Groups | Blog | Home
all groups > flash actionscript > may 2005 >

flash actionscript : Preload multiple FLVs


.:}x-=V!P=-x{:.
5/23/2005 12:00:00 AM
I have MXpro2004 and I was wondering the best way to preload multiple FLV
files. I would like to preload the next flv while the first one is playing.

I have 20 FLV movies that I want to play back to back. these are defined via
xml array.
I am using the mediaDisplay component to view the FLVs and I have a listener
to check when the movie is complete then load the next FLV and play.

There is a slight flash/pause before the next movie plays which I would like
to look more seemlessly.
flarjr4321
7/2/2005 8:46:49 PM
I would be very interested in this solution as well. I've looked everywhere.
I'm beginning to think it can't be done.

I'm simply trying to emulate what Breeze does. List box of items. Each item in
the listbox corresponds to an FLV. First one plays on open, while preloading
the next one. User can fast forward to the eighth one by clicking on item
number eight in the listbox.
Rothrock
7/2/2005 9:30:55 PM
Since any given mediaDisplay can only have one source attached to it, you will
need to have two different mediaDisplays. You will probably want to wait until
the first FLV has finished downloading before you start the next.

Then when you reach the end of one, swap the mediaDisplays, empty the first
one and start its loading. Of course that assumes the second has already
finished downloading.

Help?> Using Components?> Components Dictionary?> Media Components. This will
show you everything you need. Notable will be bytesLoaded and bytesTotal
(notice they are properties here, not methods), complete, and setMedia.
flarjr4321
7/2/2005 10:30:30 PM
So do you think this is a bad idea?

Rothrock
7/2/2005 11:08:21 PM
flarjr4321
7/3/2005 12:00:00 AM
Videos are designed to be between 20 and 30 seconds each.

The bottom-line is I'm trying to avoid the temporary file artifacts. But the
more I think about it, it may be best just to use swf segments instead of flvs.
flarjr4321
7/3/2005 12:00:00 AM
I had one more thought after I went to your site (nice by the way!!)

The only things that would be different would be:

-- 1. Instead of buttons on the left it would be a list box (preferably driven
by xml file)
-- 2. If you clicked Childhood it would play every video sequentially through
Modi9 without the user having to click again

Don't you think that's what most people want.? The ability to choose between
autoplay of the entire set of videos or surgical selection?
flarjr4321
7/3/2005 12:00:00 AM
I had one more thought after I went to your site (nice by the way!!)

The only things that would be different would be:

-- 1. Instead of buttons on the left it would be a list box (preferably driven
by xml file)
-- 2. If you clicked Childhood it would play every video sequentially through
Modi9 without the user having to click again

Don't you think that's what most people want.? The ability to choose between
autoplay of the entire set of videos or surgical selection?
Rothrock
7/3/2005 12:00:00 AM
Thanks. The buttons on the left are driven by an xml file. I don't know about
list boxes, but it would probably be a very similar idea.

For this application, the student may want or be instructed to watch a
specific clip. They wouldn't necessarily need or want to watch the first one.
If I had the first one automatically play I would have bandwidth tied up until
it had finished downloading. Even if the user immediately went to, say, Modi5.
Additionally I was trying to be extra careful with bandwidth since the
requirements were that it could work over dial up.

For autoplay, I might just add a first button that says "auto play all" or
something like that. It would allow the user to choose, and of course it would
be turn-offable.
flarjr4321
7/3/2005 12:00:00 AM
Thanks for keeping this discussion going. My assumptions are:

For my application, each presentation is designed to be no more than about 5
minutes long. The 5-minute presentation will be broken up into between 5 and 10
clips/segments.

80% of people watching the presentation will watch all segments from start
until finish. So, when the press "Presentation A" they will see the full 5-10
segments. The other 20% will see the first segment, but may choose to fast
forward to segment8"

So, my thinking is that when someone clicks "Presentation A", it engages
automode and plays "Childhood" through "Modi9", and if someone starts seeing
"Childhood" but realizes the info they need is really in "Modi8" they click on
that instead.

Also, I'm thinking interface does not require the user to hit play. The movie
cues to the proper segment by clicking on the item in the listbox.

So, I guess my question is, what flash specifics would change if your site
worked like the above description? :-)
flarjr4321
7/3/2005 1:23:16 AM
That's encouraging...

My most meaningful education comes from seeing examples of people that have
done things like this already.

Do you know of any examples of online presentations that are driven by a GUI
of multiple flvs in a listbox?

Anybody?
Rothrock
7/3/2005 1:32:04 AM
Not really. I've got something I did which has multiple FLVs to choose from,
but it doesn't have any auto playing: www.saffronthread.com/HindiVideo

But I don't think it would be too terribly difficult to add that
functionality. Again you would have to be clever about the client's anticipated
process. Also how big are your videos, etc.
.:}x-=V!P=-x{:.
7/5/2005 8:05:40 PM
AddThis Social Bookmark Button