| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2003
Posts: 1
|
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... |
|
|
|
|
|
#2 |
|
lala
Join Date: Feb 2002
Location: on the road
Posts: 2,859
|
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 () |
|
|
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|