Anonymous     ActionScript     07 Oct 2008    
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
package {
import flash.display.Sprite;
import flash.external.*;
public class Main extends Sprite
{
public function Main()
{
if (ExternalInterface.available){
ExternalInterface.addCallback("sayHello", sayHello);
}
}
public function sayHello(msg:String):void{
ExternalInterface.call("alert",'Answer from Flash:' + msg);
}
}
}