1 Reply Latest reply on May 3, 2009 8:41 AM by Gregory Lafrance

    Need help with video display

    prdas_123

      Hi. I have started using flex builder3.

      I want to display video in my application.

      It s been achievable through video display by mentioning the path of file under 'source' tag.

       

      However i am unable to do it using action script.

      This is what i am writing in action script file.

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      package

      {

       

       

      import

      flash.events.AsyncErrorEvent;

       

       

      import

      flash.net.NetConnection;

       

       

      import

      flash.net.NetStream;

       

       

       

      import

      mx.controls.VideoDisplay;

       

       

       

      public class

      vido

      {

       

       

      public function

      vido()

      {

      }

       

       

      public function prd():

      void

      {

       

       

      var nc:NetConnection=new

      NetConnection;

      nc.connect(

       

      null

      );

       

       

      var ns:NetStream=new

      NetStream(nc);

      ns.play(

       

      "h:\video.flv"

      );

       

       

      //x.source="video.flv";

      ns.addEventListener(AsyncErrorEvent.ASYNC_ERROR,async)

       

       

      function

      async(event:AsyncErrorEvent)

      {

       

       

      //do nothing

      }

       

       

       

       

      var z1:video=new video();       

      video;

       

       

      However it is not showing any method by name "attachnetstream" in video class.

      Can anyone please help in :

       

      1) how to display video using action script. As i am new user, it be appreciated if u can show code that has to be included in mxml file also.

      2) how to achieve this if i want to display file from a streaming server like wowza.

      can i get the code for same anywhere.

       

      Any help in this regard will be greatly appreciated. Pls reply as i have already spent days together for achieving same but witthh no results.

      Thank u.