1 Reply Latest reply on May 27, 2009 12:54 PM by injpix

    displaying flv file, sound but no video?

    prdas_123

      this is the code i have written for displaying a simple flv file. the video iss playing. but i can only hear its sound. i dont know how to displayu it. can u help me with this?

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Application

       

      xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:local="*">

      </local:VideoContainer>

       

       

      <mx:Script>

      <![CDATA[

       

       

      public function xyz():void

      {

       

       

      var nc:NetConnection=new

      NetConnection

      nc.connect(

      null);

       

       

       

      var ns:NetStream=new

      NetStream(nc);

       

       

      var vid:Video=new

      Video();

       

      ns.play(

      "phone.flv");

      vid.attachNetStream(ns);

      vid.width=240;

      vid.height=360;

       

       

      //vid.videoHeight=360;

       

       

      //vid.videoWidth=240;

      vid.visible=

      true

      ;

       

       

       

      this.addChild(vid);

       

       

      }

       

      ]]>

       

       

      </mx:Script>

       

       

      <mx:Button x="48" y="299" label="Button" click="xyz();"

      />

       

       

      </mx:Application>