Very frustrated with ActionscriptObject

Post here all your questions related with the SmartFoxServer iPhone API

Moderators: Lapo, Bax

Posts: 2
Joined: 10 Feb 2011, 08:13

Very frustrated with ActionscriptObject

Postby gapton » 04 Mar 2011, 08:12

Hi everyone, I have been reading the documentation but the concept of ActionScript-Java hybrid environment is still very confusing for me.

What I want to do:
from an iPhone, call sendXtMessage and pass a parameter (NSDictionary) to the server
the server then fetches the parameter, then I want to save this as BINARY to H2 Database

the problem is, when NSDictionary was sent through sendXtMessage, it gets translated into an ActionScript Object

Somehow this obj will also have access to Java methods. So its like it is actionscript object and it is also actually a java object. The server was written in Java but I have no idea how the server translate something in Java to ActionScript.

Am i missing something really obvious here? or must I write a Java extension?

but then again, they have ActionScriptObject in their Java extension source, and the name suggest its actionscript object, which obviously it isnt since its inside java.....

they deliberately implemented some/all of the methods/functions in exactly the same name too, and i am sooo soooo lost and confused now

please if someone can point me in the right directly
Posts: 2
Joined: 10 Feb 2011, 08:13

Postby gapton » 07 Mar 2011, 02:31

can somebody help please?
User avatar
Site Admin
Posts: 4522
Joined: 29 Mar 2005, 09:50
Location: Italy

Postby Bax » 07 Mar 2011, 09:00

ActionScriptObject is a simple class which is described here:
If you have a Java Extension, on the server side you will be able to retrieve the data you sent from the client using the methods of the class linked above.
If you have an ActionScript extension, you can simply access the values like this:

Code: Select all

function handleRequest(cmd, params, user, fromRoom)
        if (cmd == "myCommand")
                var myParam = params.myParam
Paolo Bax
The SmartFoxServer Team

Return to “iPhone Objective-C API”

Who is online

Users browsing this forum: No registered users and 4 guests