Skip navigation
4xyfenix
Currently Being Moderated

ExternalInterface.call always returns undefined in IE8@Windows7

Jul 30, 2012 6:56 AM

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.

 
Replies
  • kglad
    72,202 posts
    Jul 21, 2002
    Currently Being Moderated
    Jul 30, 2012 7:15 AM   in reply to 4xyfenix

    test with the following to ensure id=name:

     


    swfobject.embedSWF(



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



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



    swfVersionStr, xiSwfUrlStr,



    flashvars, params, attributes);
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points