This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Flash Site Design > August 2007 > How best to preload FLV's?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How best to preload FLV's?
|
|
| roberttraum 2007-08-20, 6:16 pm |
| I'm working on a large app (taking over from someone else) -- it's a long
series of FLV's, loading in response to user input. Thus you have an FLV
playing, user is asked for input (in the SWF), and based on choice, one of 3
possible next FLV's is loaded.
I'd like to preload all of the next 3 FLVs at each stage -- so that there's a
smooth transition.
I tried doing this, making the VideoPlayer invisible -- but the sound started
playing for each of the video clips as they pre-loaded.
Then I saw a method described whereby one could make a new Sound, connect this
to the video clip (forgive me if this is all in pseudo-code, but I've been away
from project for two weeks), and turn the sound volume to zero. This did not
work for me, although I followed the instructions precisely.
Is there any foolproof, best-practices way to preload FLVs so that one can
simply switch to them when one is ready? I suspect this might be easier in AS
3.0, but I'm only really familiar with AS 2.0 --
Any help much appreciated -- if you need further info, I can explain further
| |
| dzedward 2007-08-20, 6:16 pm |
| if you have the FLVPlayback component on stage, just don't give it a
contentPath until the buttons are clicked, then it will progressively
download/play the video...
my_btn.onRelease = function(){
flvPlayback.contentPath = "http://www.yousite.com/movie.flv";
}
| |
| David Stiller 2007-08-20, 6:16 pm |
| dzedward,
> if you have the FLVPlayback component on stage, just
> don't give it a contentPath until the buttons are clicked,
> then it will progressively download/play the video...
True, but there will almost certainly be a slight delay as each new FLV
cues up.
[color=darkred]
If you're talking about an instance of the FLVPlayback component, you
can set its FLVPlayback.volume property to 0 (this would have to be a
different instance from the one currently playing a video).
[color=darkred]
That sounds like a blog entry I wrote once ...
http://www.quip.net/blog/2007/flash...ust-video-audio
If that's the one you mean, that one uses a Video object, rather than
FLVPlayback, which might explain why it didn't work for you. (Of course,
you might have read something else altogether, but in any case, write back
and I'll try to help you if I can.)
[color=darkred]
It's really not any easier in AS3. The mechanics are pretty much the
same in this case, only the syntax is different.
David Stiller
Co-author, Foundation Flash CS3 for Designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design."
| |
| roberttraum 2007-08-20, 6:16 pm |
| The person who set this up wasn't using an FLVPlayback component, but instead
is using a netStream, and when the next video needs to be loaded calls the
attached code. What's the correct method in this case, the same? (Forgive me
if I'm vague, but I've been plopped back down into someone else's code all of a
sudden and am trying to parse this; and forgive me if I cross-posted, but I
usually don't get replies quickly -- how does one remove a post?)
vidPlay("video/"+xmlScenes[_root.currentScene]["video"]);
// and the called function is:
function vidPlay(theVideo:Object):Void {
netStream.play(theVideo);
}
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|