Achei uma solução,

Ao inves de ursar o VideoDisplay uso o Video


<?xml version="1.0" encoding="utf-8"?>
<!--
http://blog.flexexamples.com/2008/03/01/displaying-a-video-in-flex-using-the-netconnection-netstream-and-video-classes/-->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white"
        creationComplete="init();">

    <mx:Script>
        <![CDATA[
            import mx.utils.ObjectUtil;

            [Bindable]
            private var nc:NetConnection;
            [Bindable]
            private var ns:NetStream;
            private var video:Video;
            private var meta:Object;
            NetConnection.defaultObjectEncoding =
flash.net.ObjectEncoding.AMF0;
            //NetStream.defaultObjectEncoding     =
flash.net.ObjectEncoding.AMF0;
            SharedObject.defaultObjectEncoding  =
flash.net.ObjectEncoding.AMF0;
            private function init():void {

                nc = new NetConnection();
                nc.addEventListener(NetStatusEvent.NET_STATUS, netStatus);
                nc.connect("rtmp://seuFMS/teste");


            }

                private function netStatus(event:NetStatusEvent):void
                {

                    switch (event.info.code)
                    {
                        case "NetConnection.Connect.Success" :
                            var nsClient:Object = {};
                            nsClient.onMetaData = ns_onMetaData;
                            nsClient.onCuePoint = ns_onCuePoint;

                            ns = new NetStream(nc);
                            nc.client = this;
                            ns.play("video");//video que esta dentro do seu
fms sem o .flv
                            ns.client = nsClient;

                            video = new Video();
                            video.attachNetStream(ns);
                            uic.addChild(video);
                           break;
                        case "NetConnection.Connect.Closed" :
                           break;
                        case "NetConnection.Connect.Failed" :
                           break;
                        case "NetConnection.Connect.Rejected" :
                           break;
                        default :
                           //statements
                           break;
                    }
                }
            public function setHistory(msg:String):void{
            //writeln("showHistory: " + msg + "\n");
            }
            private function ns_onMetaData(item:Object):void {
                trace("meta");
                meta = item;
                // Resize Video object to same size as meta data.
                video.width = item.width;
                video.height = item.height;
                // Resize UIComponent to same size as Video object.
                uic.width = video.width;
                uic.height = video.height;
                panel.title = "framerate: " + item.framerate;
                panel.visible = true;
                trace(ObjectUtil.toString(item));
            }

            private function ns_onCuePoint(item:Object):void {
                trace("cue");
            }
        ]]>
    </mx:Script>

    <mx:Panel id="panel" visible="false">
        <mx:UIComponent id="uic" />
        <mx:ControlBar>
            <mx:Button label="Play/Pause" click="ns.togglePause();" />
            <mx:Button label="Rewind" click="ns.seek(0); ns.pause();" />
        </mx:ControlBar>
    </mx:Panel>

</mx:Application>

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para flexdev@googlegroups.com
Para sair da lista, envie um email em branco para [EMAIL PROTECTED]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a