View Single Post
  #9 (permalink)  
Old 07-26-2010, 09:27 AM
nitinmukesh nitinmukesh is offline
Junior Member
 
Join Date: Mar 2009
Posts: 9
Default

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.100;
btn.100;
addChild(btn);
btn.addEventListener(MouseEvent.CLICKonClick);

function 
onClick(e:MouseEvent) {
    if(
ExternalInterface.available) {
        
ExternalInterface.addCallback("fsMethod"newMethod);
        
ExternalInterface.call("fsMethod"12356.0);
    }
}

function 
newMethod(val:Number) {
    
ExternalInterface.call("showAlert"val);

In SWFKIT
PHP Code:
function fsMethod(xy)
{
Dialogs.msgBox(y);
return 
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?
Reply With Quote