View Full Version : I want to have my flvs to start after a certain %
dtrace
April 22nd, 2007, 01:18 AM
The problem is that the flv playback component I'm using plays the video right away, but that is causing the playback to stutter.
Is there any way to make the playback pause until a certain percentage of the video has loaded?
If you could advise me on this, that would be appreciated.
Thanks.
rgbeat
April 22nd, 2007, 03:07 AM
you should check http://gotoandlearn.com/ and look for video basics tutorial
Dom_
April 22nd, 2007, 10:32 AM
all you need to do is preload the flv file :)
heres how I would do it
basicaly just change the value of 99 by the % you want to get to before you play the flv
ActionScript Code:
var loaded_interval:Number = setInterval(checkBytesLoaded, 80, ns);
function checkBytesLoaded(ns:NetStream) {
var pctLoaded:Number = Math.round(ns.bytesLoaded / ns.bytesTotal * 100);
if (pctLoaded >= 99) {
preloader_txt._visible = false;
ns.pause(false);
clearInterval(loaded_interval);
} else {
preloader_txt._visible = true;
ns.pause(true);
}
}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.