Page 1 of 1

Call an ActionScript (AS2) function from an application

Posted: Wed Jun 16, 2010 3:49 am
by pandaloveyou
I want call AS2 function from C# (VS2008)

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!!!

Posted: Wed Jun 16, 2010 6:00 am
by Softanics
Thank you for your question.

The code looks well. Could you please send me the whole sample to support (at) f-in-box.com ?

Thank you.

Posted: Wed Jun 16, 2010 2:23 pm
by pandaloveyou
Thank, tI solved the problem.

Posted: Thu Jun 17, 2010 2:40 pm
by Softanics
pandaloveyou wrote:Thank, tI solved the problem.


What was the problem?

Thank you.

Posted: Fri Jun 18, 2010 4:49 am
by pandaloveyou
because I using Sample04_Translucency, in this MyTranslucencyForm I call this.FlashMethod_CallFunction ... It's ok