• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

ExternalInterface.call always returns undefined in IE8@Windows7

New Here ,
Jul 30, 2012 Jul 30, 2012

Copy link to clipboard

Copied

Hello,

I have simple function in javascript on the page:

<script type="text/javascript">

var sound_status   = true;

function get_sound_status()

{

    //alert("sound_status = " + sound_status);

    console.info("index.html::get_sound_status() = %s", sound_status);

    return sound_status;

}  

</script>

I call it from ActionScript via ExternalInterface.call("get_sound_status") and it works perfectly everywhere except IE8@Windows7 (IE8@WinXP works fine).

It always returns undefined UNTIL(!) 'Tools->Developer Tools' window is opened. It's enough to open and close it immediately.

If uncomment alert() I see the message 'sound_status = true', but in AS I have undefined.


The code embeding the swf is

NOTE: ${stuff} is replaced with actual values while publishing:



var params = {};


params.quality = "high";


params.bgcolor = "${bgcolor}";


params.allowscriptaccess = "sameDomain";


params.allowFullScreen = "true";


params.wmode = "transparent";



var attributes = {};


attributes.id = "${application}";


attributes.name = "${application}";


attributes.align = "middle";



swfobject.embedSWF(



"${swf}.swf", "flashContent",



"${width}", "${height}",



swfVersionStr, xiSwfUrlStr,



flashvars, params, attributes);

I looked into similar posts. Most of them advise check the existance of id attribute. It's here.

Thanx in advance, any help is really appreciated.

TOPICS
ActionScript

Views

739

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jul 30, 2012 Jul 30, 2012

Copy link to clipboard

Copied

LATEST

test with the following to ensure id=name:


swfobject.embedSWF(



"${swf}.swf", attributes.id,



"${width}", "${height}",



swfVersionStr, xiSwfUrlStr,



flashvars, params, attributes);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines