I can't get ExternalInterface.addCallback to work - trying to call an AS3 function from a js button
Posted
by Guillaume Riesen
on Stack Overflow
See other posts from Stack Overflow
or by Guillaume Riesen
Published on 2010-06-15T18:41:01Z
Indexed on
2010/06/15
18:42 UTC
Read the original article
Hit count: 180
JavaScript
|actionscript-3
I'm trying to use ExternalInterface.addCallback to allow js to call an as3 method. My code is as follows:
AS:
ExternalInterface.addCallback("sendToActionscript", callFromJavaScript);
function callFromJavaScript():void{ circle_mc.gotoAndStop("finish"); }
JS: Switch to square
function callToActionscript() { flashController = document.getElementById("jstoactest") flashController.sendToActionscript(); }It's not working. What am I doing wrong?
© Stack Overflow or respective owner