Bug in Firefox 3.0.1 MAC
September 12th, 2008 by LuisIn 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.
- SWFAddress Help Forum
- Firefox 3 + Adblock = disaster (asfusion blog)
- FF3 breaks SWFAddress (sometimes) on OS X
- Firefox 3 and SWFAddress
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.



September 12th, 2008 at 5:06 pm
this is indeed very scary…
did you try to change the wmode to see if it has any incidence?
September 12th, 2008 at 5:35 pm
Yes I have try to remove the window mode, change the wmode value, etc getting the same result.
September 12th, 2008 at 5:35 pm
Same movie but no window mode set in the html:
http://www.lessrain.com/projects/luis/as3/bugs/ff3mac/deploy/index2.html
September 16th, 2008 at 11:20 pm
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.
September 16th, 2008 at 11:24 pm
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
September 17th, 2008 at 1:33 am
A little correction:
you must replace
this.setValue=function
with the following term.
Best regards
Macm
September 17th, 2008 at 8:24 am
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.
September 19th, 2008 at 1:00 am
I believe I also got the same bug in Safari. Anyone else?
September 19th, 2008 at 9:39 am
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!)
September 21st, 2008 at 7:54 pm
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…
September 23rd, 2008 at 12:13 am
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.
September 23rd, 2008 at 9:17 pm
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
October 14th, 2008 at 10:29 pm
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.
November 5th, 2008 at 2:54 pm
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);
}
};
January 7th, 2009 at 3:02 pm
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.
January 27th, 2009 at 7:16 pm
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
February 14th, 2009 at 7:20 am
Thanks! This had me stumped, didn’t know my flickering was due to Mac + Firefox 3 + SWFAddress.
February 14th, 2009 at 9:25 am
By the way SWFAddress 2.2 was released with a fix:
-Build-in fix for the Firefox 3/Mac OSX blinking effect.
August 6th, 2009 at 10:08 am
Just download version 2.3 from http://www.asual.com/swfaddress/, solves all the above.
October 1st, 2009 at 8:14 pm
bug isnt fixed..even with vrsn SWFAddress 2.4
see MSLK.com