how to pass a value to javascript from flash using externalinterface
hi,
i'm currently trying to call a javascript function and pass values to it. but i'm not really familiar in using the addcallback since i only tested on calling a function from flash without passing anything to the function.
Basically, i'm going to retrieve the values of a node from xml.
and then i will assign those values to a variable in flash.
now what i'm going to do next is pass this value to a javascript parameter..is it done using externalinterface?
Could anyone give me an example.
I just need to throw the value to the javascript function parameter and no return values to the actionscript.
The event is that whenever an image is click, the corresponding value for each image is passed to the javascript function.
here is my unfinished script.
function imageClicked(e:Event):void {
for each (var imageURL:XML in xml.images.link_to)
{
ExternalInterface.call("TestButton",imageURL);
}
}
thanks so much in advance. ![]()