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
Very frustrated with ActionscriptObject
ActionScriptObject is a simple class which is described here: http://www.smartfoxserver.com/docs/docPages/javadoc/it/gotoandplay/smartfoxserver/lib/ActionscriptObject.html
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:
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
The SmartFoxServer Team
Return to “iPhone Objective-C API”
Who is online
Users browsing this forum: No registered users and 21 guests