Call a JavaScript function from Flash
This Flash function calls a Javascript and sends a string to be displayed in an alert window.
import flash.external.*;
btn.onPress = function() {
ExternalInterface.call("playmovie", "hi Matt");
};
Put this Javascript function in the html file
function playmovie(theMessage){
alert(theMessage)
}
2 comments:
Thanks for this very simple and well explained tutorial. It really helps me in my website.....cheers
But how do I retrieve return values from the JavaScript function I just called in flash?
Post a Comment