The following documentation has more information:
ExternalInterfaceclass. First we must use the
addCallback()function to expose the ActionScript function we want to call to the container.
public function init():void
// expose an ActionScript function to the container
ExternalInterface.addCallback( "doSomethingInActionScript", doSomethingInActionScript );
public function doSomethingInActionScript( arg1:String, arg2:Number ):String
// get the Flex application (Flash object)
var isIE = navigator.appName.indexOf("Microsoft") != -1;
var flashName = "flashObjectName";
var flashObject = (isIE) ? parent.Main.window[flashName] : document[flashName];
if( flashObject )
// call the Flex application (Flash object)
flashObject.doSomethingInActionScript( "arg1", 2 );
I hope that helps...
Thanks for that Ben.
Will give it a shot.
Let me know if it works.
(And if it does, please hook me up with some points. Thanks.)
I found that site ("flexafterdark") before looking in forum, but I didn't understand... They (and you) say you have to expose the ActionScript function (using ExternalInterface class)... Okay, but I want to call a FLEX application (basically a .swf), not a function! And even worse, I want to call it using parameters...
I am sure is something here I don't understand... but what?
Could you, please, be a little more descriptive than those guys from that site?
Any help would be much appreciated!