In the following I am trying call action script function from js function. What am I doing wrong here? Should we include action script filename swf file here:
<html>
<body>
<input type="button" value="click" onclick="ExternalInterface.addCallback('addblock', addblock);" />
</body>
</html>
AS code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.controls.Button;
public static var cam:Camera = Camera.getCamera();
public static var video:Video = new Video(10, 20);
public function addblock():Void
{
Alert.show("Got 1");
}
]]>
</mx:Script>
</mx:Application>