Hi,
I am struggling to make an application work.
I have to send some values to SWFKIT from SWF and do some calculations then retrieve the values back in SWF. SWF is created in AS3.
Any sample available for this?
Inside SWF
PHP Code:
var btn:Btn = new Btn();
btn.x = 100;
btn.y = 100;
addChild(btn);
btn.addEventListener(MouseEvent.CLICK, onClick);
function onClick(e:MouseEvent) {
if(ExternalInterface.available) {
ExternalInterface.addCallback("fsMethod", newMethod);
ExternalInterface.call("fsMethod", 123, 56.0);
}
}
function newMethod(val:Number) {
ExternalInterface.call("showAlert", val);
}
In SWFKIT
PHP Code:
function fsMethod(x, y)
{
Dialogs.msgBox(x + y);
return x + y;
}
fsmethod is the method defined in swfkit and newMethod should be called from SWFKIT method after the calculation.
What should I put in SWFKIT?