mardi 22 septembre 2015

play a external flv video

hello please somoene can help me with this ...

I want to play a external flv video ("../sync/video/video.flv"), but in case the video is missing or when there is a error (StreamNotFound) I want to play automaticaly another video flv

case "NetStream.Play.StreamNotFound":"../sync/filler/video2.flv");

but it doesn't work ....

here is the full code :

var vid:Video;
var nc:NetConnection = new NetConnection();
var ns:NetStream = new NetStream(nc);

var customClient:Object = new Object();
customClient.onMetaData = metaDataHandler;
ns.client = customClient;"../sync/video/video.flv");

vid = new Video();

function netStatusF(e:NetStatusEvent):void {
switch ( {
case "NetStream.Play.StreamNotFound":"../sync/filler/video2.flv");

function metaDataHandler(infoObject:Object):void {
vid.width = infoObject.width;
vid.height = infoObject.height;

Aucun commentaire:

Enregistrer un commentaire