Visa ett inlägg
Oläst 2006-06-22, 00:53 #2
blipplopp blipplopp är inte uppkopplad
Nykomling
 
Reg.datum: Jun 2006
Inlägg: 5
blipplopp blipplopp är inte uppkopplad
Nykomling
 
Reg.datum: Jun 2006
Inlägg: 5
Oh well, löste det hela själv. Rätt lösning är som följer om någon har intresse;

Kod:
// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
var netStream:NetStream = new NetStream(netConn);
trace(netStream.bytesTotal);
netStream.onStatus = function(infoObject) {
	status.text += "Status (NetStream)"+newline;
	status.text += "Level: "+infoObject.level+newline;
	status.text += "Code: "+infoObject.code+newline;
};
// Attach the NetStream video feed to the Video object:
my_video.attachVideo(netStream);
// Set the buffer time:
netStream.setBufferTime(5);
// Being playing the FLV file:
netStream.play("data.flv");
//Load
percent = 0;
onEnterFrame = function () {
	if (percent != 100) {
 percent = Math.floor((netStream.bytesLoaded/netStream.bytesTotal)*100);
 _root.loadbar._xscale = percent;
 _root.loadtxt.text = percent;
	} else {
 delete onEnterFrame;
	}
};
VA! säger du? nu laddar den juh inte in skiten och startar när mätaren är 100%. Nä, visst fan,, det är juh så att man streamar FLA :P jag som inte tänkte mig för.
blipplopp är inte uppkopplad   Svara med citatSvara med citat