............................................................................
If you want an array from javascript to actionscript
............................................................................
somewhere in your class put something like:

     ExternalInterface.addCallback('SWFReceiver', as3Receiver);

but remember that you need a receiver in as3:

public function as3Receiver(a:Array /*or object, or *, etc...*/):void {
          //do something with your array
     }

then in js:

    var swfo = document.getElementById('idOfYourSwfElement');
    swfo.SWFReceiver(yourArrayObject);

................................................................................
if you want an array from AS3 to javascript
................................................................................

var dataScript:XML= new XML("<![CDATA[ function(){ jsReceiver(["+ formattedArrayAsString +"]);} ]]>");
ExternalInterface.call(dataScript);



On 5/26/2010 3:07 AM, Ashim D'Silva wrote:
This seems fairly impossible but if there's an awesome way to do it
I'll be heaps grateful.

I receive a function name and a set of parameters via XML

<analytics>
        <function>
                <name>webtrends</name>
                <params>
                        <param>98780</param>
                        <param>Joseph</param>
                        <param>Iceland</param>
                </params>
        </function>
</analytics>

I'm hoping there's a way for me to fire an ExternalInterface.call()
function with any amount of parameters provided to me.
I'm one step away from telling the other side I'll send them an array,
but hoping for the long shot.

Cheers,

Ashim

The Random Lines
www.therandomlines.com
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to