1 Reply Latest reply on May 18, 2006 12:32 AM by ddarkblue

    Use "NetStream" in Flex 2

    ddarkblue
      I use NetStream as:
      ------------------------------------------------------
      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="conn()" layout="absolute" frameRate="31" cornerRadius="0">
      <mx:Script>
      <![CDATA[
      import flash.net.*
      import mx.controls.Alert;
      public var nc:NetConnection
      public var ns:NetStream;
      private function conn():void{
      nc=new NetConnection();
      nc.addEventListener(NetStatusEvent.NET_STATUS,statusHa);
      nc.connect("rtmp://192.168.0.119/Audio");
      }
      private function statusHa(err:NetStatusEvent):void{
      Alert.show(err.info.code);
      }
      ]]>
      </mx:Script>
      </mx:Application>
      ---------------------------------------------------
      it always alert the message: NetConnection.Connect.Failed
      the address rtmp://192.168.0.119/Audio can be connected by flash use actionscript 2 .
      @_@ why