Bug in Firefox 3.0.1 MAC

September 12th, 2008 by Luis

In the last few days I’ve been experiencing weird rendering problems in some websites while using the latest stable version of Firefox (3.0.1) in MAC.

Searching google I found more people having similar issuses like blinking pages when using SWFAddress for Flash in FF3 MAC.

In all the cases the solution given for the problem is to add a small delay between the visual transition and the JavaScript interaction of SWFAddress.

After reading all this posts I thought the problem was specific for SWFAddress but my surpsise was when I found similar problems in one of our projects which is not using SWFAddress at all and it is almost 4 years old (AS2). In this specific project we were using ExternalInterface extensivelly.

I have done a small test with just a gradient background and three round corner buttons using ExternalInterface call method to call three different javscript functions and the results are scary:

1) First button (left) calls an alert in javascript using a timeout:

JAVASCRIPT: setTimeout(”alert(’test 1 with timeout’)”, 1000);
FLASH: ExternalInterface.call(”test1″);

2) Second button (middle) calls an alert in javascript:

JAVASCRIPT: alert(”test2 no timeout”);
FLASH: ExternalInterface.call(”test2″);

3) Third button (right) calls scrollTo in javascript:

JAVASCRIPT: scrollTo(0,100);
FLASH: ExternalInterface.call(”test3″);

Second and third button in FF3 MAC makes the flash movie to behave in a weird way when the javascript action is executed.

http://www.lessrain.com/projects/luis/as3/bugs/ff3mac/deploy/

Looking at this results and considering that SWFAddress uses ExternalInterface I can say for now that part of the problem is caused by using the ExternalInterface call method in FF3 MAC (looking at the problem from a flash developer point of view, I don’t know what is happening behind the “Cocoa Firefox” scenes), but maybe the problem goes deeper than this, I don’t know yet, this is only my first attempt to find out the causes of Flash blinking and behaving bad in FF3 MAC.

20 Responses to “Bug in Firefox 3.0.1 MAC”

  1. sitron Says:

    this is indeed very scary…
    did you try to change the wmode to see if it has any incidence?

  2. Luis Says:

    Yes I have try to remove the window mode, change the wmode value, etc getting the same result.

  3. Luis Says:

    Same movie but no window mode set in the html:

    http://www.lessrain.com/projects/luis/as3/bugs/ff3mac/deploy/index2.html

  4. Marcel-André Casasola Merkle Says:

    Possible solution/fix for SWFAddress and Firefox issue

    Hello!

    It’s a very annoying bug and all I could find on the internet is the proposal to put a delay between “SWFAddress.setValue(theValue);” and heavy calculating in Flash. But it doesn’t really work for my project and I keep getting random flickering effects.

    So your post (especially the line setTimeout(”alert(’test 1 with timeout’)”, 1000);) inspired me to simply modify SWFAddress and add the delay THERE.

    And (as I can tell for now) it works.

    I replaced:

    this.setValue=function

    with

    this.setValue=function(7e){if(21.isFirefox()){setTimeout(”SWFAddress.setValueWithDelay(’”+7e+”‘);”,500);}else{SWFAddress.setValueWithDelay(7e)}};this.setValueWithDelay=function

    I would be very eager to hear about your experience with this little code snippet.

  5. Marcel-André Casasola Merkle Says:

    Inspired by your post I tried to simply fix the issue by modifying SWFAddress:

    I changed

    this.setValue

    to

    this.setValue=function(7e){if(21.isFirefox()){setTimeout(”SWFAddress.setValueWithDelay(’”+7e+”‘);”,500);}else{SWFAddress.setValueWithDelay(7e)}};this.setValueWithDelay=function

    including a delay if Firefox is the browser.

    It works for my project but it would be nice to hear if it also solves the problem for others.

    Macm

  6. Marcel-André Casasola Merkle Says:

    A little correction:

    you must replace

    this.setValue=function

    with the following term.

    Best regards
    Macm

  7. Luis Says:

    Hi Marcel,

    Your solution for the SWFAddress should do the job in this specific case where SWFAddress is used.

    At the moment adding a delay betwen Flash and JS seems to be the only solution.

  8. Miles Lukas Says:

    I believe I also got the same bug in Safari. Anyone else?

  9. sitron Says:

    safari is working ok here. (except that if you have a scroller the flash only renders on the visible height (!= 100%) of the screen… the rest being yellow… but that’s another story!)

  10. diego Says:

    hi to all,
    i did some fast test and it seems that the problem is the swfobject and not the swfaddress: i’m working on a project using swfaddress 2.1 and swf object 1.4.4 and i don’t have any kind of flickering.
    this is not the first time i saw “white flash” during rendering and in the past the swfobject and css get me a lot of rendering problem, so try with an older version and see…

  11. Marcel-André Casasola Merkle Says:

    Hello Diego,

    I never used SWFObject so I am quite sure the ExternalInterface calls are the problem. But as this bug only surfaces in Firefox 3 Mac I suppose it is all the browsers fault and should be fixed there.

    Until anybody will do this I propose modifying the javascript of SWFAdress but as the people over at Asual told me maybe adding a setTimeout() to the SWFAddress AS3 portion may do the trick as well or even better.

    I prefer changing SWFAddress above doing it in my code because SWFAddress is commonly used and so I only have to change it once for all my projects.

  12. David Salzer Says:

    We are working on a large project using deep linking without SWFAddress, and having the same issue. We are using simple BrowserManager - So I bealive the problem is ExternalInterface

  13. David Kaplan Says:

    I’ve noticed I’ll get the flicker if I use onMouseUp.

    I just started using swfAddress and didn’t see a flicker in my learning url. And didn’t see any flicker in a new site build where I’m using swfAddress … for a while, then after I added a scrolling text box that uses dragger.onMouseUp = function() … bam, flicker. I switched the onMouseUp to onRelease and the flicker stopped.

    Just thought I’d offer that up as something I’ve noticed, maybe I was using onMouseUp incorrectly to begin with.

  14. soenke Says:

    you have to replace the line
    this.setValue=function(value) {

    with this code:

    this.setValue=function(value){
    if(_browser.isFirefox()){
    setTimeout(”SWFAddress.setValueWithDelay(’”+value+”‘);”,500);
    }
    else{
    SWFAddress.setValueWithDelay(value);
    }
    };

        this.setValueWithDelay=function(value) {
    
  15. espy Says:

    Hey there, thanks for the useful post and comments, I managed to get rid of the flashing in Firefox on Mac with their help.

    Since the variables seem to be different in every version of swfAddress, here’s a version-neutral way of doing it:

    Find “this.setValue=function(VAR){” in the swfaddress.js, where VAR is something like _64 or similar. Replace that whole bit with

    starts here –>this.setValue=function(VAR){
    if(navigator.userAgent.indexOf(”Firefox”) >= 0 && navigator.userAgent.indexOf(”Mac”) >= 0) {
    setTimeout(”SWFAddress.setValueWithDelay(’”+VAR+”‘);”,500);
    }
    else{
    SWFAddress.setValueWithDelay(VAR);
    }
    };
    this.setValueWithDelay=function(_64) {<– ends here

    Remember to exchange VAR back to what it was, like _64.

    This will add a delay only in Firefox on Macs.

  16. I like to play Says:

    Thanks so much for this post - I was pulling my hair out over this, thinking it was maybe an extra refresh of the entire site called by swfAdress - fortunately it wasn’t :-) Great tip about the delay… thanks again :-)

  17. Mark Says:

    Thanks! This had me stumped, didn’t know my flickering was due to Mac + Firefox 3 + SWFAddress.

  18. Mark Says:

    By the way SWFAddress 2.2 was released with a fix:
    -Build-in fix for the Firefox 3/Mac OSX blinking effect.

  19. Wynand Says:

    Just download version 2.3 from http://www.asual.com/swfaddress/, solves all the above.

  20. artur Says:

    bug isnt fixed..even with vrsn SWFAddress 2.4

    see MSLK.com

Leave a Reply