Skip to main content
Known Participant
Apr 20, 2012 5:50 AM UTC
Question

How to call functions in different objects in flex from flash media server

Hi,

In the documentation of flash media server, in Client class, the parameter "methodName" in "call" function says

"MethodName

A string indicating a remote method. The string uses the form "[objectPath/]method". For example, the string "someObj/doSomething" tells the client to invoke the NetConnection.someObj.doSomething() method on the client or remote server. The string "doAction" calls the doAction() method on the client or remote server.

"

As i understand i can add different objects to Netconnection in flex and call the methods of those objects from fms.

I tried this way, but it didnt work

In flex code, something like this:

var someObject:SomeClass = new SomeClass();

netConnection.client = someObject;

class SomeClass

{

     public var otherObject1:OtherClass1 = new OtherClass1();

     public var otherObject2:OtherClass2 = new OtherClass2();

}

class OtherClass1

{

     public function doSomething()

     {

          trace("it didnt work ");

     }

}

In fms code i tried to call it:

client.call("otherObject1/doSomething");

But it didnt work, any help will be apreciated

thanks, Javier

    This topic is closed to new replies. Start a new post to keep the conversation going.

    1 reply

    Patel Bharat
    Inspiring
    Apr 25, 2012 8:52 AM UTC