ExternalInterface + Timer Class Problem

DLL Edition of the F-IN-BOX
devilmaycry
Posts: 2
Joined: Tue Oct 28, 2008 10:45 am

ExternalInterface + Timer Class Problem

Postby devilmaycry » Tue Oct 28, 2008 11:16 am

Hello everyone, am a new member here and i just discovered this amazing product you have, anyway i m playing arround with the functionalities and i discovered a bug that may interest you so heres the situation i have:

i used the Sample07_ExternalInterface and replaced the externalInterface.swf with the swf attached, my SWF have a timer that will occurs after 1 second and when the closure function is called i add a string to the Text field on the stage to make sure the call has been occured and also i call the ExternalInterface.call("alert","Called JS") in the closure function. so the result is alot of ALERTS... it seems like the DLL recieved alot of ExternalInterface Call, however i removed this ExternalInterface.call("alert","Called JS") line from the closure function and everything worked like expected i recieved the events every 3 seconds and the TextField has been updated.

Any Ideas why this is hapenning?

here's the code

var timer:Timer=new Timer(1000,2);
timer.addEventListener(TimerEvent.TIMER,callJS);

function callJS(e){

trace("calling");
text_txt.text+= "calling\n";
ExternalInterface.call("alert","JS Called");

}
timer.start();


also the source and the swf are can be found here

http://www.flashreply.com/temp/

thank you

best regards

DevilMayCry

PS: the FLA is a FCS3 document.

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

Postby Softanics » Tue Oct 28, 2008 3:04 pm

Thank you for your question.

If AfxMessageBox(); is commented, it works well...
Best regards, Artem A. Razin,
F-IN-BOX support
Ask your question here: http://www.f-in-box.com/support.html

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

Postby Softanics » Tue Oct 28, 2008 3:09 pm

It's not a problem of the f-in-box implemenation.

I've just created a simple dialog-based mfc application in VC++, added a flash activex, in the handler of FlashCall I've inserted the same AfxMessageBox();

As a result, the same effect.

If you don't create a window inside a handler of flash event, the application works well.

Thank you.
Best regards, Artem A. Razin,

F-IN-BOX support

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

devilmaycry
Posts: 2
Joined: Tue Oct 28, 2008 10:45 am

Postby devilmaycry » Wed Oct 29, 2008 12:07 pm

Thank you for your answer, yes it is like i mentionned in the post that without the alert (creation of other windows in handler as you said) it work!

ok so no alerts in handlers :)

thanks


Return to “DLL Edition”

Who is online

Users browsing this forum: No registered users and 15 guests

cron