Groups | Blog | Home
all groups > flash (macromedia) > april 2004 >

flash (macromedia) : streaming video


JIMMYD
4/23/2004 5:35:36 PM
on the timeline that contains the video u need to assign a stop(); action to
the first frame, then
on the movie clip instance that contains the video u could add some action
like this:

onClipEvent(enterFrame) {
var loaded:Number = this.getBytesLoaded();
var total:Number = this.getBytesTotal();
if(loaded == total/2) {
play();
}
}

This example would wait for half the movie to load before it started to
play. All u have to do is change the 2 to another number if u wanted to wait
a longer or shorter amount of time for the movie to start playing.

[quoted text, click to view]

z12
4/23/2004 9:00:32 PM
Is there a way to use action script to check to see if a sufficient amount of
video has buffered and then to cause the linked flv to play automatically?
With larger video files, "automatically play" does not work well, but I would
like my audience not to have to click the play button after guessing about when
a sufficient amount has been buffered.
z12
4/25/2004 3:28:54 AM
Thanks for your response! This would work well for embedded video, but I would
like to link to an external flv file with the new capabilities of MX2004. The
progress bar of the media playback component shows the loading of the flv
stream, and I wonder if there is a way to tap into that with action script in
order to automatically play at a certain percentage of the the streaming load?
I find that I have to guess when enough has been buffered, and if I am wrong,
the playback stops and stutters part way through play back.
z12
4/27/2004 11:16:49 PM
Thanks to netforce_tech@yahoo!
AddThis Social Bookmark Button