PDA

View Full Version : Buffering, preloading, end of clip


MikeG
05-22-2002, 10:19 PM
Could somebody explain buffering to me.

fas.avclip.SetBufferingTime - does this command allow you to preload video before running it. If so, how do I use it properly.

fas.event.NewStream - Does this command allow me to have flash wait until the video is ready to continue? How does this work.

Below is the current code I'm using to load video clips. what can I add to preload the video into memory. And if there is a command, what do I do to flush it from memory?

fscommand ("fas.avclip.VideoOnTop", "false");
fscommand ("fas.avclip.load", "media/MPEG/34.mpg");
fscommand ("fas.avclip.xy", "14,105");
fscommand ("fas.avclip.Autosize", "TRUE");


I noticed that the video clips I'm using sometimes go out of synch with audio and was hoping preloading the video clips would fix this. Any ideas on what I should do?

One last thing,

fas.event.EndOfStream - If I add this as a key frame, does this tell the flash movie to wait until the video is done to continue?

I'm sorry for so many questions but the help isn't very informative in respects as to what these commands do.

Thank you in advance.

Mentor Lee
05-27-2002, 12:23 PM
fas.avclip.SetBufferingTime - does this command allow you to preload video before running it. If so, how do I use it properly.
The SetBufferingTime is for streaming video only, if you load the video from local drive, you don't need this command.





fas.event.NewStream - Does this command allow me to have flash wait until the video is ready to continue? How does this work. This command notifies your flash file that a video file was opened.
Then you can call fas.clipinfo.GetAuthor ... to get the clip information




I noticed that the video clips I'm using sometimes go out of synch with audio and was hoping preloading the video clips would fix this. Any ideas on what I should do? You may set the VideoOnTop to true, or
Change the video dimension(w*h) to smaller, or
reduce the video frame rate when you encode the video file





fas.event.EndOfStream - If I add this as a key frame, does this tell the flash movie to wait until the video is done to continue?
Yes. for example
frame 1:
fsCommand("fas.avclip.load", ".baby.mpg")
fsCommand("fas.event.EndOfStream",_target + ".EndStream");
stop()

frame 2 ~ frame 10 ...other animation

frame 11, label as EndStream:
goto frame 5

Then the flash stop at frame 1, and continue to play frame 5 when finish playing video.


[Tips]: If you want the event/variable to work in movie clips,
you may pass
_target + ".yourEventFrameLabel" or
_target + ".yourVariable"
to fas.event.xxx commands