Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Supporting Technologies > Flash Media Server

Reply
 
Thread Tools Rate Thread Display Modes
Old 04-20-2005, 08:53 AM   #1
darth
Senior Member
 
darth's Avatar
 
Join Date: Dec 2003
Location: Estonia
Posts: 273
Default netstream buffer, video streaming

I want to make a "buffering" to my flash video playback, but -

NetStream.bufferLength is starting to decrease towards the end of video file, also I cannot seem to get it to display numbers from 1 to 100 when my bufferTime is set for example, 17 seconds...
Help!

ActionScript Code:
var netConn:NetConnection = new NetConnection(); netConn.connect(null); var netStream:NetStream = new NetStream(netConn); my_video.attachVideo(netStream); netStream.setBufferTime(17); netStream.play("http://server.com/videofile.flv"); var a:Number = 0; onEnterFrame = checkBuffer; function checkBuffer():Void {     a = Math.floor(netStream.bufferTime/netStream.bufferLength*100);     if (a<97) {         status_txt.text = "buffering... "+a+"%";     } else {         status_txt.text = "";     } }

Last edited by darth; 04-20-2005 at 08:57 AM.
darth is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:49 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.