Home Tutorials Forums Articles Blogs Movies Library Employment Press Buy templates

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

Reply
 
Thread Tools Rate Thread Display Modes
Old 10-22-2003, 11:40 AM   #1
gintonic
Registered User
 
Join Date: Oct 2003
Posts: 1
Default Please Help with "NetStream"...

Hi there,

I try to know the "% preload" of my "NetStream"...
I Know I can use : "NetStream.bytesLoad" and "NetStream.bytesTotal", but how... what's wrong in my code.

fSetConnect = function(vWhichFlv){
objNetCon = new NetConnection();
objNetCon.connect(null);

objNetStream = new NetStream(objNetCon);
objNetStream.setBufferTime(20);
mcVideo.attachVideo(objNetStream);

objNetStream.play(vWhichFlv);

}

fSetConnect.prototype.fBufferCheck = function(){
vBytesLoaded = objNetStream.bytesLoaded;
vBytesTotal = objNetStream.bytesTotal;
vPercentLoad = Math.floor(vBytesLoaded/vBytesTotal * 100);

if(vPercentLoad >= 100){
clearInterval(vInter);
mcPreload._visible = 0;
//objNetStream.play(vWhichFlv);
}else{
mcPreload._xscale = vPercentLoad;
}
}

var vNewFlv = new fSetConnect('testHalf.flv');

I think "objNetStream.play('testHalf.flv')" is place to early in my code... because it start to play before the preload...

Thanks in advance...
gintonic is offline   Reply With Quote
Old 10-23-2003, 04:55 AM   #2
hangalot
lala
 
hangalot's Avatar
 
Join Date: Feb 2002
Location: on the road
Posts: 2,859
Default

are the bytesloaded properties or methods?
to thst i it is a method trace it if it returns something like [Function] then its a mthod and should be called with ()
__________________
oi poloi
http://www.memorphic.com/news/
hangalot 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 10:04 PM.


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