Hi,
I need little help to have some feature in http streamin of flv. I am using
swf file with netstream to stream video. I am not able to get metatada for
duration also i am not able to change video on completion using listener
object. Below is the code

Note: nsVideo is the video object, residing in a movieclip vFLV, instance
name of video object is video.

import mx.video.*;

//connection
var ncFLVConnection:NetConnection = new NetConnection();
ncFLVConnection.connect(null);
var nsVideo:NetStream = new NetStream(ncFLVConnection);
nsVideo.setBufferTime(1);
vFLV.video.attachVideo(nsVideo);
nsVideo.play("INA Montag.flv");
//listener
nsVideo.contentPath = "INA Montag.flv";
var listenerObject:Object = new Object();
// listen for complete event; play new FLV
listenerObject.complete = function(eventObject:Object):Void {
    if (nsVideo.contentPath == "INA Montag.flv") {
       nsVideo.play("ina1.flv");
    }
};
nsVideo.addEventListener("complete", listenerObject);

 //video controls

nsVideo.onStatus = function(oData:Object):Void  {
 trace(oData.code);
};
var nDuration:Number = 0;

nsVideo.onMetaData = function(oMetaData:Object):Void  {
 nDuration = oMetaData.duration;
 trace(nDuration);
};
vFLV.mPlay.onPress = function():Void  {
 nsVideo.pause(false);
};
vFLV.mPause.onPress = function():Void  {
 nsVideo.pause(true);
};
vFLV.mStop.onPress = function():Void  {
 nsVideo.pause(true);
 nsVideo.seek(0);
};
bufferingBar = my_buffrgbar;
import mx.video.*;
//nsVideo.bufferTime = 15;
bufferingBarHidesAndDisablesOthers = true;
//vFLV.video.contentPath = "INA Montag.flv";
setInterval(updateProgress, 100);
function updateProgress():Void {
 var nPercent:Number = 100*nsVideo.time/nDuration;
 mProgress.mPercent._xscale = nPercent;
 percentage.text = nsVideo.time;
}
nsVideo.onMetaData = function(oMetaData:Object):Void  {
 vFLV.video._width = oMetaData.width;
 vFLV.video._height = oMetaData.height;
};
vFLV.reSize.onPress = function():Void  {
 vFLV._width = vFLV._width*1.5;
 vFLV._height = vFLV._height*1.5;
};


i am able to play first video. i am not getting duration of the video. I am
not able to load video 2 all files reside in same folder. I am able to
resize video in flash, but i have to use the swf in a webpage there i need
the video resize on a liquid web page. so that when user screen res. are
differrent video also resizes along with other elements of webpage.

-- 
Abhishek Kumar
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to