Skip to main content
June 14, 2008
Question

application.onPublish bug

  • June 14, 2008
  • 1 reply
  • 432 views
Hi,

I am using FMS3 developer edition

When I load components.asc on a server side,
onPublish event is not firing,

When I comment out (disable) loading components.asc
onPublish event is firing

attached sample main.asc file
--------------------------------------------

load("components.asc");
load("netservices.asc");

//------------
application.onAppStart = function() {
//Object to hold a direct reference to connected clients
this.userHandler = new Object();
};
application.onConnect = function(client, email) {

//register user to framework
//gFrameworkFC.getClientGlobals(client).username = email;

// Accept the new client's connection
this.acceptConnection(client, email);
};
application.onConnectAccept = function(client, email) {
trace("connection accepted")
};
application.onDisconnect = function(oldClient) {
trace("disconnected")
};
// Called when the client publishes
application.onPublish = function(client, myStream) {
trace(myStream.name + " is publishing into application " + application.name);
}
application.onUnpublish = function( client, myStream ) {
trace(myStream.name + " is unpublishing" );
}

--------------------------------------

Anyone faced this problem?

    This topic has been closed for replies.

    1 reply

    June 16, 2008
    I was able to run solve my problem,

    If someone faces this problem, just try like following

    gFrameworkFC.application.onPublish = function(client, myStream) {

    }