Skip to main content
Known Participant
April 20, 2012
Question

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

  • April 20, 2012
  • 1 reply
  • 615 views

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 has been closed for replies.

    1 reply

    Patel Bharat
    Inspiring
    April 25, 2012