0 Replies Latest reply on Oct 15, 2007 3:59 AM by kwaik

    how to load netstream with HTTP or RTMP protocol

    kwaik Level 1
      i try using flash.media.video to load the stream, but it always show me error msg of file not found. how i set the http path to load my flv files.
      pls give me some guide. thk

      this is my source code

      ===================================test.mxml============================================== ====
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="func_load();">
      import mx.core.UIComponent;
      import flash.display.Sprite;
      import flash.net.*;
      import flash.media.Video;
      private var m_inStream:NetStream;
      private var m_video:Video;
      private var main_nc:NetConnection;
      private var ui:UIComponent;
      public function func_load():void{
      ui=new UIComponent();
      main_nc=new NetConnection();
      m_inStream = new NetStream(main_nc);
      m_video = new Video(320, 240);

      m_inStream.play(" http://localhost/stream_15_9_2007.flv"); //cannot work
      // m_inStream.play("stream_15_9_2007.flv"); //can work


      m_inStream.addEventListener(NetStatusEvent.NET_STATUS , abc);
      private function writeln(s:String):void{
      debug_txt.text += s +"\n";
      public function abc(event:NetStatusEvent):void{
      writeln("netStatus: " + event);
      var info:Object = event.info;
      for(var p:String in info) {
      writeln(p + " : " + info[p]);
      <mx:TextArea x="115" y="268" width="560" height="317" id="debug_txt" horizontalScrollPolicy="auto" verticalScrollPolicy="auto"/>
      ========================================================================================== =