Hi,
In my opinion the only way to transfer structured data from JSFL to AS (and back) is via JSON.
So, try to check what is the reason to got an error.
As a general workflow: you need to stringify the data on JSFL side, and to parse them back on AS side.
For example:
/* JSFL */
var obj = { color: 2, fol: "ABC" };
var stringifiedData = JSON.stringify( obj ); // You should have JSON class
var jsonstring = swfPanel.call( "receiveJSFLData", stringifiedData );
var retval = JSON.parse( jsonstring );
/* AS */
function receiveJSFLData( json:String ):String{
var data:Object = JSON.parse( json );
// Do your stuff with the data
var retval:Object = {};
return JSON.stringify( retval );
}
Edit:
Here is a vanilla javascript implementation of the JSON, so you can incorporate it in your code:
https://gist.github.com/atheken/654510