Call an ActionScript (AS2) function from an application
Posted: Wed Jun 16, 2010 3:49 am
I want call AS2 function from C# (VS2008)
In C#:
In AS2:
but it not work, please help me!!!
In C#:
Code: Select all
private f_in_box__lib.f_in_box__control f_in_box__control1 = new f_in_box__lib.f_in_box__control() ;
f_in_box__control1.FlashMethod_CallFunction("<invoke name=\"loadPlayer\" returntype=\"xml\"><arguments><string>" + val.ToString() + "</string></arguments></invoke>");
In AS2:
Code: Select all
import flash.external.*;
ExternalInterface.addCallback("loadPlayer", this, InternalFunction);
function InternalFunction(str: String): Void {
// code
}
but it not work, please help me!!!