Jump to content

Recommended Posts

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
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...