Flash Form and External Interface

.NET Edition of the F-IN-BOX
Leon
Posts: 2
Joined: Fri Jun 08, 2007 1:31 pm

Flash Form and External Interface

Postby Leon » Fri Jun 08, 2007 2:03 pm

I'm trying to get the external interface working with the Flash form (not the control) but cannot trap flash-events in C#: the MyTranslucencyForm_OnFlashCall handler never gets triggered.
Triggering a function in flash from C# using FlashMethod_CallFunction works fine.
Do you have an example like sample7, but then for the Flash form version?
Cheers, Leon

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

Postby Softanics » Fri Jun 08, 2007 2:25 pm

Thank you for your question.

I think I understand where is the problem. You set the handler from the Designer? Am I right? Then the Designer writes the following code:

Code: Select all

      private void InitializeComponent()
      {
         //
         // MyTranslucencyForm
         //
         this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
         this.ClientSize = new System.Drawing.Size(300, 300);
         this.Name = "MyTranslucencyForm";
         this.OnFlashCall += new f_in_box__lib.f_in_box__form.OnFlashCallEventHandler(this.MyTranslucencyForm_OnFlashCall);
      }


But code doesn't call InitializeComponent() ! To solve it add InitializeComponent() to the end of the constructor. I've jkust tried it and now it works well.

Please try. If you will have the problem, I will upload the project and post link here.

Thank you.
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

Leon
Posts: 2
Joined: Fri Jun 08, 2007 1:31 pm

Postby Leon » Fri Jun 08, 2007 3:03 pm

Hello Artem,
You're perfectly right. Issue solved. Thanks for your help.
Cheers, Leon


Return to “.NET Edition”

Who is online

Users browsing this forum: No registered users and 6 guests

cron