NetStatusHandler never gets called (Flash CS5)

Posted by Loto on Stack Overflow See other posts from Stack Overflow or by Loto
Published on 2010-06-12T08:07:34Z Indexed on 2010/06/12 8:12 UTC
Read the original article Hit count: 423

Filed under:
|
|

Hi, I'm using this code to connect Flash CS5 to WebORB:

import flash.display.*;
import fl.events.*;
import flash.events.NetStatusEvent;
import flash.net.*;
import flash.utils.*;
import fl.transitions.*;
//
var connection:NetConnection;
//
function initORB(){
var gateway:String = "http://www.domain.com/weborb30/console/weborb.aspx";
connection=new NetConnection();
connection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
connection.connect(gateway);
}
//
function netStatusHandler(e:NetStatusEvent)
{
    trace("status entered");
}
initORB();

The strange thing is that:

  1. the netStatusHandler function NEVER gets called;
  2. but I can call any orb exposed method (that's not possible if Flash and WebORB are not connected);

The fact is that I want to know if the client is connected too.

Regards, Loto

© Stack Overflow or respective owner

Related posts about flash

Related posts about actionscript