Sign in to follow this  
Followers 0
Zazza

[SOLVED] Send an Array with callfunction to Flash...

2 posts in this topic

#1 ·  Posted (edited)

Greetings,

AFAIK the Flash ExternalInterface API should support Boolean, String, Number, Array, Object types.

Supposing I have this Array in AutoIt script:

$Array = [1,2,3]

and this callback function in Flash:

ExternalInterface.addCallback("sendArray",null,sendArray)

Function sendArray(message:Array) {
...
}

I know that with:

$oFlash.CallFunction('<invoke name="sendArray"><arguments><string>some string</string></arguments></invoke>')

I can send a single string to Flash.

How can I send a single or multidimensional array to Flash? Which is the correct CallFunction syntax?

Thank you very much for your time...

Edited by Zazza

Share this post


Link to post
Share on other sites



Ok, found by myself:

$oRP.CallFunction('<invoke name="checkFavs" returntype="xml"><arguments><array><property id="0"><string>first</string></property><property id="1"><string>second</string></property></array></arguments></invoke>')

In ActionScript:

function checkFavs(message:Array) {
    trace(message[1]); // will type "second"
}

See ya.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0