import flash.external.ExternalInterface; ExternalInterface.addCallback("asFunc", this, asFunc); function asFunc(str:String):Void { out.text = "JS > Hello " + str; }
send_btn.addEventListener(MouseEvent.CLICK, clickListener); function clickListener(eventObj:Object):Void { trace("click > " + mean.text); ExternalInterface.call("calc", mean.text); }
This is the code i am using to call a function calc in javascript, but i get the following error. What am i doing wrong here? (I modified the example on live docs.)
Error:
1046: Type was not found or was not a compile-time constant: Void.