views:

23

answers:

1

I'm trying to call a Flash function from javascript passing complex data types as arguments
the Flash function is being called correctly but the args have no value,
I mean they are both complex data types with properties
but in Flash when I try to access those properties I get "undefined"
and yes, I'm sure the javascript code is correct and the arguments have the correct value in javascript

//this is the flash part
ExternalInterface.addCallback("OnProcessFound", OnProcessFoundHandler);
function OnProcessFoundHandler(sender, e):void
{   
    txtTrack.text = "external event " + new Date().getTime().toString() + sender.toString() + e.toString();     
}

//this if the javascript code that calls the flash method 
//and passes the complex args
function OnProcessFoundDlg(sender, e)
{
    document.getElementById('Untitled-1').OnProcessFound(sender, e);            
}
A: 

I think you're limited to serializing your object which you assign to the flashvars and then deserialize it from Flash.

meder
Ok, actually I was hoping Flash would "know" what properties my objects have. The serialization approach will be my last resort.
camilin87