PDA

View Full Version : MediaPlayback Buffer Time


lordcatalien
10-17-2005, 11:23 PM
Hi Guys, I have a (hopefully) quick question for you.

I changed the MediaPlayback component to have custom buttons and colors and I wanted to use it for a number of movies on my client's site.

I've created a .swf that has the playback component on it.

How can I pass these values to it:
1. movie name and location
2. movie length
3. buffer time (can i set this in the swf so it applies to all?)

I've seen a bunch of different threads about ns.connect and stuff, but I didn't know if that applied to me because i'm not using FCS.

Any help would be most appreciated. Unf'ly, I'm a n00b, so the smaller words, the better. :)

Thanks!

lordcatalien
10-18-2005, 12:13 AM
btw. here's the code i have on the first frame. the custom mediaPlayback component is on the same frame, but another layer. the movie is only one frame long.

The movie seems to load because I can hear it. I just can't see it. Is it loading in the correct place? Or hidden for some reason? My playback component's instance name is my_video.

Thanks


// 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);
netStream.onStatus = function(infoObject) {
trace("Status (NetStream)"+newline+"Level: "+infoObject.level+newline+"Code: "+infoObject.code+newline);
};
// Attach the NetStream video feed to the Video object:
this.my_video.attachVideo(netStream);
// Set the buffer time:
netStream.setBufferTime(15);
// Being playing the FLV file:
netStream.play(mymovie+".flv");
trace("playing");