toObject() not recognised?

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

smilefr
Posts: 58
Joined: 23 Mar 2009, 16:50
Location: France

toObject() not recognised?

Postby smilefr » 15 Dec 2010, 11:58

I am trying to convert an SFSObject into an Actionscript object via the toObject() Method. But it throws me an error telling me that the method does not exist.
Also i cannot find detail for this method in the AS3 API doc.

Please help me, I really need to convert this SFSObject into Actionscript Object!

Here is my code:

Code: Select all

  function onExtensionResponse(evt:SFSEvent):void
         {
             if (evt.params.cmd == "Char_infos")
             {
            var sfso:ISFSObject = evt.params.params as SFSObject;
                  var resObj = sfso.toObject()
            
            trace("TEST: "+resObj["1"])

             }
         }
smilefr
Posts: 58
Joined: 23 Mar 2009, 16:50
Location: France

Postby smilefr » 15 Dec 2010, 14:02

Ok after searching on the forums i found a pre-release for the next API: http://www.smartfoxserver.com/2X/quickUpdates/SFS2X_API_AS3.swc
Which contains the new methods for SFSObject --> AS3 Object conversion.

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 54 guests