javascript - Opera does not call Flash's ExternalInterface.callback() function inside js callback called by flash -


i'm new flash actionscript. i've flash audio recorder (modified jrecorder) records audio in wav format , i've added support mp3 encoding. recorder exports public functions js using externalinterface.callback() , calls js callbacks using externalinterface.call() flash container (website). when flash exported function called js start recording/encoding/other function flash calls js callback event handler event like- recording_started, recording_stopped, encoding_started, encoding_ended etc. works fine in ie, ff, chrome not in opera.

i've used in web project follows-

-> recording time maximum 2 min , recording stops when user stops (button) or when time limit reached. , both conditions, 'recording_stopped' event triggered , inside event handler, mp3 encode function called (a flash exported function).

-> here, js event handler called flash , in tern calls flash exported function.

the problem is, in opera, exported flash function not called inside handler. if function called @ end of handler, codes above function executed not function , if place function @ beginning of handler, codes below not executed. , no js error shown in console. but, if called js function not callback event handler flash, function executed fine.

i've tested on 2 different computers opera versions 11.51 & 12.15 , flash player versions 11.3, 11.6 & 11.7.

my opera version 12.15 , flash player version 11.7 (for browsers).

why happening?

i've found way ignore problem while typing question. solution is, instead of calling flash exported function directly event handler, i'm calling using js's window.settimeout() function -

window.settimeout(function(){     if($.jrecorder.encodetomp3())       isencoding = true;                 }, 0); 

i'm not sure why happening. @raptor commented reason on question , can reason or else.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -