Skip to main content
Known Participant
March 15, 2013
Question

NetConnection.failed

  • March 15, 2013
  • 1 reply
  • 420 views

I dont quite understand why i am unable to connect. to FMS. I have checked  the FMS port tester and the results showed there are open.  I believe my uri string is correct.  Why cant i connect? Below is a snippet of my code:

import.flash..net.NetConnection;

import.flash.media.Video;

import..flash.media.Camera;

import flash.media.Microphone;

var nc:NetConnection = new NetConnection();

nc.connect("rtmfp://fms/flashTest");

nc.addEventListenet(NetStatusEvent.NET_STATUS, netHandler);

function netHandler(event:NetStatusEvent):void{

     switch(event.info.code){

      case "NetConnection.Connect.Success":

     trace("Your connected");

    break;

   case "NetConnection.Connect.Failed":

   trace(" Sorry unable to connect");

  break;

  case "NetConnection.Connect.Reject":

  trace("Please try again");

  break;

}

}

var video:Video = new Video();

video.width = camera.width;

video.height = camera.height;

video.x = 10;

video.y = 10;

addChild(video);

var camera:Camera = Camera.getCamera();

camera.setMode(400,300,20);

camera.setQuality(0,85);

video.attachCamera();

addChild(camera);

var microphone:Microphone = Microphone.getMicrophone();

microphone.codec = soundcodec.SPEEX;

microphone.Framesperpocket = 1;

    This topic has been closed for replies.

    1 reply

    March 18, 2013

    Hi,

    Have you tried connecting to either the vod/live applications? Can you tell me what you have in your flashTest application main.asc?

    Thanks,

    Apurva