Call an ActionScript (AS2) function from an application

.NET Edition of the F-IN-BOX
pandaloveyou
Posts: 7
Joined: Mon Jun 14, 2010 3:33 pm

Call an ActionScript (AS2) function from an application

Postby pandaloveyou » Wed Jun 16, 2010 3:49 am

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

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Wed Jun 16, 2010 6:00 am

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.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

pandaloveyou
Posts: 7
Joined: Mon Jun 14, 2010 3:33 pm

Postby pandaloveyou » Wed Jun 16, 2010 2:23 pm

Thank, tI solved the problem.

Softanics
Site Admin
Posts: 1402
Joined: Sat Sep 18, 2004 3:03 am
Location: Russia, St. Petersburg
Contact:

Postby Softanics » Thu Jun 17, 2010 2:40 pm

pandaloveyou wrote:Thank, tI solved the problem.


What was the problem?

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

Ask your question here: http://www.f-in-box.com/support.html

pandaloveyou
Posts: 7
Joined: Mon Jun 14, 2010 3:33 pm

Postby pandaloveyou » Fri Jun 18, 2010 4:49 am

because I using Sample04_Translucency, in this MyTranslucencyForm I call this.FlashMethod_CallFunction ... It's ok


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 9 guests

cron