How to resolve the following error in the mxml program?
The error is
Loading configuration file /opt/flex/frameworks/flex-config.xml
/home/tom-j/programs/flex/html/aa.mxml(17): Error: Access of undefined property addBody.
ExternalInterface.addCallback("addBody", addBody);
Program is
<?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.Button;
import mx.controls.Alert;
import flash.display.InteractiveObject;
import flash.display.Sprite;
import flash.media.*;
import flash.net.*;
import flash.external.*;
import flash.external.ExternalInterface;
// "javascript function", flash function
ExternalInterface.addCallback("addBody", addBody);
public function addBody():void
{
Alert.show("Got input from JS");
}
]]>
</mx:Script>
</mx:Application>