Frustrating FireFox bug with ExtnernalInterface

I have a swf with some html copy below it. It should (seemingly) expand when clicking the button and contract when clicked again.

see example

I need to swap the z-Index of the divs containing the SWF and the html copy. The swf is embeded using SWFObject.

I have two simple javascript methods for re-assigning the SWF div’s z-index, but in FireFox these  from the actionscript to the  javascript methods are not getting through.  It works  in Safari and in IE (version ?) on the pc.

Download all source files here.

The ActionScript looks like this:

import flash.events.MouseEvent;
import flash.external.ExternalInterface;

var expandedBool:Boolean = false;

bt.addEventListener(MouseEvent.CLICK, onClicked);
bt.label = "putFlashOnTop";
function onClicked(evt:MouseEvent) {
if (expandedBool){
gotoAndStop("closed");
expandedBool = false;

if (ExternalInterface.available) {
ExternalInterface.call("putFlashOnBottom");
} else {
tf.text = "ExternalInterface not available";
}
bt.label = "putFlashOnTop";
} else {
gotoAndStop("open");
expandedBool = true;

if (ExternalInterface.available) {
ExternalInterface.call("putFlashOnTop");
} else {
tf.text = "ExternalInterface not available";
}
bt.label = "putFlashOnBottom";
}
}
This entry was posted in code, Professional and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

One Comment

  1. Posted 09/18/2009 at 6:25 am | Permalink

    Lamplighters? They are have super posh camp and fancy bloody marry parties.

    Out house guys? That’s a paid position. And there ability to get away with driving a truck around while sipping on a bottle of whisky is quite limited. So – hardcore, indeed. But not so piratey.

One Trackback

  1. [...] The original problem laid out here [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • Rocket Number 9

    Rocket 9 is the personal and professional online presence of Flash developer and citizen Mike Connor. Cloud Swing, Inc. is our software development shop.