Firefox Flash item invisible

835 views
Skip to first unread message

Buglish

unread,
Jul 15, 2009, 10:25:41 AM7/15/09
to SWFObject
Just using the example for static insert results in the flash item
being invisible for only Firefox browsers.
After lots of searching and reading though the API I tried using the
swfobject.switchOffAutoHideShow();
command before
swfobject.registerObject("myId", "9.0.0");
which made it worked.

Add new FAQ answer that if the flash object is not visible in Non IE
browsers; use the switchOffAutoHideShow command.

Getify Solutions, Inc.

unread,
Jul 15, 2009, 10:55:49 AM7/15/09
to swfo...@googlegroups.com
This is incorrect information. You must have something wrong in the code you
are using. That function is for a different purpose, and should not be used
in the way you are describing. It actually refers to the alternate content
visibility, not the flash swf object visibility.

If you want to post some code here, or better yet, a link, we can probably
spot the issue pretty quickly.

--Kyle




--------------------------------------------------
From: "Buglish" <sjdu...@gmail.com>
Sent: Wednesday, July 15, 2009 9:25 AM
To: "SWFObject" <swfo...@googlegroups.com>
Subject: Firefox Flash item invisible

Buglish

unread,
Jul 15, 2009, 11:32:15 AM7/15/09
to SWFObject
See link http://www.bam-sa.co.za/

On Jul 15, 4:55 pm, "Getify Solutions, Inc." <get...@gmail.com> wrote:
> This is incorrect information. You must have something wrong in the code you
> are using. That function is for a different purpose, and should not be used
> in the way you are describing. It actually refers to the alternate content
> visibility, not the flash swf object visibility.
>
> If you want to post some code here, or better yet, a link, we can probably
> spot the issue pretty quickly.
>
> --Kyle
>
> --------------------------------------------------
> From: "Buglish" <sjdupr...@gmail.com>

Buglish

unread,
Jul 21, 2009, 10:54:59 AM7/21/09
to SWFObject
From the link you can see I used the sample text exactly.
Only when I used Firefox the flash object was invisible. The only way
I could get it to work was to add the switchOffAutoHideShow();
function.

What is the real functionality of this function?

On Jul 15, 5:32 pm, Buglish <sjdupr...@gmail.com> wrote:
> See linkhttp://www.bam-sa.co.za/

Getify Solutions, Inc.

unread,
Jul 21, 2009, 11:09:51 AM7/21/09
to swfo...@googlegroups.com
You haven't provided a link, so I can't see, yet.

It's possible your problem is that the SWF you're trying to load doesn't get
the proper stage size. We've had a number of people with issues about this.

Or it could be something else particular to your SWF.

But in fact, the static SWF loading does work in FF, so you shouldn't need
to use extra API functions to hack it to work.

This function in fact is used to control/prevent the flicker that some
people see where the alternate content shows for a brief snap before the SWF
content shows up. Our code doesn't have any functionality that leaves a SWF
totally hidden even after embed, as you seem to be trying to use this
function to undo.

So, if your SWF is loading but not showing, there's another problem and we
can troubleshoot it if you want to post a link.

But, I just didn't want misinformation about this function be the cure for
this problem, because that's improper usage.

You can read our documentation for a more detailed explanation of the
purpose of the function in question.


--Kyle



--------------------------------------------------
From: "Buglish" <sjdu...@gmail.com>
Sent: Tuesday, July 21, 2009 9:54 AM
To: "SWFObject" <swfo...@googlegroups.com>
Subject: Re: Firefox Flash item invisible

Vincent Polite

unread,
Jul 21, 2009, 11:35:36 AM7/21/09
to swfo...@googlegroups.com
Link is here if you haven't checked yet, Kyle

See link http://www.bam-sa.co.za/

Vincent

Vincent Polite

unread,
Jul 21, 2009, 11:44:27 AM7/21/09
to swfo...@googlegroups.com
So guys, it appears that the problem that Buglish is describing is a known issue with Firefox 3.5 and SWFObject 2.2.  Check the thread here for details:

http://code.google.com/p/swfobject/issues/detail?id=327

Using the switchOffAutoHideShow method shouldn't be necessary but due to a rendering issue in FF3.5, it is an acceptable workaround for SWFObject2.2 users it seems.  Thanks for the heads up, Buglish.  Although I am personally not sure how to update the FAQ... it's probably a good idea until a true fix can be seen from the Firefox folks.

Q: Is this sort of thing worth embedding directly into the SWFObject code base (i.e. if FF3.5 on platform X, execute code behind SwitchOffAutoHideShow automatically?)

Vincent

Getify Solutions, Inc.

unread,
Jul 21, 2009, 11:46:31 AM7/21/09
to swfo...@googlegroups.com
The "registerObject" code calls should be in the head of your document, not inline in the body.
 
--Kyle

Getify Solutions, Inc.

unread,
Jul 21, 2009, 11:51:04 AM7/21/09
to swfo...@googlegroups.com
Can you please provide a simple page (only this SWF, not all the other stuff), showing this behavior. Leave off the "switchOff..." call, and let us see it fail reproduceably in FF3.5?
 
--Kyle

Vincent Polite

unread,
Jul 21, 2009, 11:52:13 AM7/21/09
to swfo...@googlegroups.com
This is true, and generally better scripting practice (putting your script in the head).  You should also make sure that you execute switchOffAutoHideShow() before any swfobject register.  Putting both in the head is preferable as a result.  One of the key benefits to "swapping" code like swfobject is the ability to separate your content from your scripting.  If you ARE going to insert your code inline, I would suggest that you do the swfobject references AFTER your relevant objects and divs get loaded, not before.

Vincent

Q:  Does the generator generate the inline script like this?  If so, it should probably be updated.

Vincent Polite

unread,
Jul 21, 2009, 12:04:45 PM7/21/09
to swfo...@googlegroups.com
So I did some basic testing and this is what I found.

If the code is included inline the way that the original poster has on his linked page, then the AutoShowHide method IS in fact necessary to see the Flast content in FF3.5.

However, if I include the register code in the <head> of the document, then the Flash renders just fine.

My guess is that a race condition is introduced by not putting the swfobject.register in a domready sort of function (not sure if it tries to do that internally).  Or maybe it's just a strange rendering issue with FF3.5 (since this doesn't occur in other versions of FF via hearsay).  In any case, I was able to create a quick demo where I cut and paste the code from the original posters website and reproduced his issue of a flash movie not being visible/rendering properly.

Hope this clears up the confusion.  Original Poster, try moving your swfobject commands to the <head> portion of the file and then comment out your switchOffAutoHideShow() call.  I think you may find that things work in that situation.

Best,

Vincent
Message has been deleted

PrimeMarketing

unread,
Jul 24, 2009, 3:24:32 PM7/24/09
to SWFObject
Kyle, please don't get me wrong, but ...

if you say "This is incorrect information.", I definitely disagree
with you, because this swfobject.switchOffAutoHideShow(); is exactly
what makes my test.swf show up at http://fischerwirt.primemarketing.at/swfobject/

Feel free to try http://fischerwirt.primemarketing.at/swfobject/noShow.html
to see the effect which Buglish has described.

Saying about switchOffAutoHideShow(); "That function is for a
different purpose, and should not be used
in the way you are describing." is not helpfull at all.

Whereas putting swfobject.switchOffAutoHideShow(); before
swfobject.registerObject(); seems to be - well - at least a quite good
work around.

So, do you know why the test.swf (as downloaded) it's not working with
my German Firefox 3.0.12, German Vista Ultimate SP2, German Flash
Plugin WIN 10,0,12,36

or do you still insist in saying: "Don't use this as a work around -
but I I'm not sure about why you shouldn't" :-)

regards
Heinz

On 21 Jul., 17:09, "Getify Solutions, Inc." <get...@gmail.com> wrote:
> You haven't provided a link, so I can't see, yet.
>
> It's possible your problem is that the SWF you're trying to load doesn't get
> the proper stage size. We've had a number of people with issues about this.
>
> Or it could  be something else particular to your SWF.
>
> But in fact, the static SWF loading does work in FF, so you shouldn't need
> to use extra API functions to hack it to work.
>
> This function in fact is used to control/prevent the flicker that some
> people see where the alternate content shows for a brief snap before the SWF
> content shows up. Our code doesn't have any functionality that leaves a SWF
> totally hidden even after embed, as you seem to be trying to use this
> function to undo.
>
> So, if your SWF is loading but not showing, there's another problem and we
> can troubleshoot it if you want to post a link.
>
> But, I just didn't want misinformation about this function be the cure for
> this problem, because that's improper usage.
>
> You can read our documentation for a more detailed explanation of the
> purpose of the function in question.
>
> --Kyle
>
> --------------------------------------------------
> From: "Buglish" <sjdupr...@gmail.com>
> Sent: Tuesday, July 21, 2009 9:54 AM
> To: "SWFObject" <swfo...@googlegroups.com>
> Subject: Re:FirefoxFlash item invisible
>
>
>
> > From the link you can see I used the sample text exactly.
> > Only when I usedFirefoxthe flash object was invisible. The only way
> > I could get it to work was to add the switchOffAutoHideShow();
> > function.
>
> > What is the real functionality of this function?
>
> > On Jul 15, 5:32 pm, Buglish <sjdupr...@gmail.com> wrote:
> >> See linkhttp://www.bam-sa.co.za/
>
> >> On Jul 15, 4:55 pm, "Getify Solutions, Inc." <get...@gmail.com> wrote:
>
> >> > This is incorrect information. You must have something wrong in the
> >> > code you
> >> > are using. That function is for a different purpose, and should not be
> >> > used
> >> > in the way you are describing. It actually refers to the alternate
> >> > content
> >> > visibility, not the flash swf object visibility.
>
> >> > If you want to post some code here, or better yet, a link, we can
> >> > probably
> >> > spot the issue pretty quickly.
>
> >> > --Kyle
>
> >> > --------------------------------------------------
> >> > From: "Buglish" <sjdupr...@gmail.com>
> >> > Sent: Wednesday, July 15, 2009 9:25 AM
> >> > To: "SWFObject" <swfo...@googlegroups.com>
> >> > Subject:FirefoxFlash item invisible

Vincent Polite

unread,
Jul 24, 2009, 4:01:48 PM7/24/09
to swfo...@googlegroups.com
@Primemarketing, while I agree with you in concept, in Kyle's defense, I think he's saying while using switchOffAutoHideShow() allows users to see their Flash content isn't as much a solution as taking advantage of a function that happens to solve a condition much like slapping a television set with a fuzzy image "solves" the problem of a bad image.  The real solution is to either get cable or move your TV somewhere where there's a clear signal, not to advocate that everyone slap their TVs.  :)

I do think the use of the term "misinformation" is misapplied.  It's not a best solution, but blowing on the Nintendo cartridges and slapping a TV worked for millions of people.  /shrug

Perhaps not a great example, but hopefully you get the tongue-in-cheek point of it.

In terms of switchOffAutoHideShow, we've been able to establish in other threads the following:

1.  If you move the code in the the <head> of your content instead of relying on page loading and DOM race conditions to rule how your Flash content gets embedded, then the standard code seems to work in FF3.5 as well as other browsers.
2.  If you move your code (whether it's a register or the dynamic publishing version of embedSWF) into a DOM ready event, such as $(document).ready - jQuery or probably the domready event handler that comes with SWFObject, then that works as well.
3.  If you try to run things using inline scripting, then you get invisible non-embedding Flash in FF3.5.

In terms of the "why" this happens, I unfortunately have to leave that to the folks who know the inner workings of Mozilla.  Dealing with your flash embed code and implementing it as specified in items 1 and 2 above, however, should work for you.  If you absolutely positively have to do it with step3, then using the switchOffAutoHideShow() function seems to provide relief, but this seems to be based on a race condition that has as much to do with how 3.5 does rendering as it might have to do with any sound programming logic involving SWFObject.

Vincent

Vincent Polite

unread,
Jul 24, 2009, 4:03:45 PM7/24/09
to swfo...@googlegroups.com
 I should note that our tests aren't exhaustive, and so definitely shouldn't be taken as gospel, but correct given the specific pages I've personally worked with, which currently totals 3 users in the wild.

Vincent

Getify Solutions, Inc.

unread,
Jul 24, 2009, 6:54:29 PM7/24/09
to swfo...@googlegroups.com
I stand by what I've said. Telling people "hey, use this function, it seems to fix our problem" is just as much misinformation as telling someone that if they pick a lock that was meant to be opened with a specific key, that this is ok because at least it gets the door open. It wasn't intended to be done that way. You may do so, and I can't stop you, but it is misinformation to post on this list (which is archived for forever in the web/search engines) that it's a valid workaround, because it is not. At least in my opinion.
 
I also stand by what I've said about the fact that this problem (the flash mis-rendering issue in FF3.5) is, so far as I know, only happening to people who are using swfobject incorrectly, according to our best practices.  I have not yet seen a reliable, reproduceable test case where our standard code-generator generated code/markup fails to work in FF3.5. If someone can provide such, and I can verify, then I'll re-examine my position. But until then, so far as I know, they are experiencing unintended behavior because they are using the library in an unintended way. The behavior in this circumstance is both undefined and unsupportable (practically speaking).
 
Let me clarify again, so everyone understands. The "switchOffAutoHideShow()" function has one, and only one, purpose. That is:
 
1. control whether the alternate content (in the case of dynamic publishing), OR the swf itself (in the case of static publishing) is initially hidden during the duration of time (mere miliseconds) when swfobject has taken control of said content, and is doing version checking and/or attempting to embed the content.
 
Once that brief period of time has elapsed, and SWFObject knows what it's going to do, it always re-shows something, either the alternate content, or the SWF, depending on success/failure.
 
Previous to adding that function, authors had no control over this behavior. We always assumed we should hide those things, to prevent the said unwanted content from unnecessarily being shown and then hidden again. For instance, how ugly is it UX wise to go to a page, and see first a JPG saying "download flash", and then pop in a second later the intended flash. You'd say to yourself, "man, they shouldn't have shown me that 'get flash' button since clearly I have flash". So, you'd probably want to just hide that until a version check could know if the alternate content or swf was appropriate to show.
 
But, some people didn't like that UX. Or in some rare cases, it provided a different kind of styling the considered ugly UX.  They wanted more control. So we gave it to them. We said, OK, we won't auto-hide anything while we're waiting. We'll let you take care of that yourself with your own CSS, JS, etc.
 
Notice how in none of that discussion was there any notion of "Some people had bugs in FF3.5 so we gave them a hack function to work around it".  That function was not designed for that. Plain and simple.
 
In fact, I'd go so far as to say, as an educated guess, that the site in question would probably perform the same with SWFObject 2.1 as 2.2, as I don't see anything about the situation that should be different (except that 2.2 has this function which people are trying to use). But as I've said, that's putting a bandaid over a splinter without removing the splinter, and expecting it to heal. You haven't solved the problem, you've masked it.
 
To further clarify:
 
SWFObject does not, under any normal circumstances that I'm aware of, accidentally leave a SWF hidden, in FF3.5 or anywhere else. So, shutting off SWFObject's behavior to initially hide the SWF (in the static publishing model) is NOT what's solving your issue. You are simply allowing the SWF in all cases to show up and effectively disabling SWFObject from working properly. If it is remaining hidden, so far as I can tell, it's because something is.... WRONG.... with the authored code or flash. Not a bug in FF or SWFObject.
 
Perhaps this is a corrupt flash version install in the FF3.5 in question. Perhaps the version number is wrong. Perhaps the author is not properly putting their code in the HEAD of the document. Or any number of other possible problems.
 
-------------------------------------
 
But in no way shape or form do I think (and others may disagree with me, that's fine), that it is CORRECT information to tell people "hey, if you have trouble with FF3.5, don't try and fix your code, just use this function and it'll magically work". I call that misinformation. And I'm sorry if I've offended people by having that opinion.
 
I remain open to having someone give me a reliable test case which disproves what I'm saying. I'll happily troubleshoot. And I'll personally fix the bug in SWFObject if there is one, or champion the bug report to Mozilla if there is one. But at this time, I don't have enough reliable information to say as such.
 
 
--Kyle
 
 
 
 
 
 

Sent: Friday, July 24, 2009 1:01 PM
Subject: Re: Firefox Flash item invisible

Getify Solutions, Inc.

unread,
Jul 24, 2009, 7:12:53 PM7/24/09
to swfo...@googlegroups.com
On the contrary, that SWF shows fine for me at the link you provided:
http://fischerwirt.primemarketing.at/swfobject/noShow.html

I have FF3.5 on windows XP SP3.

--Kyle




--------------------------------------------------
From: "PrimeMarketing" <googl...@primemarketing.at>
Sent: Friday, July 24, 2009 12:24 PM
To: "SWFObject" <swfo...@googlegroups.com>
Subject: Re: Firefox Flash item invisible

>
> Kyle, please don't get me wrong, but ...
>
> if you say "This is incorrect information.", I definitely disagree
> with you, because this swfobject.switchOffAutoHideShow(); is exactly
> what makes my test.swf show up at
> http://fischerwirt.primemarketing.at/swfobject/
>
> Feel free to try
> http://fischerwirt.primemarketing.at/swfobject/noShow.html
> to see the effect which Buglish has described.
>
> Saying about switchOffAutoHideShow(); "That function is for a
> different purpose, and should not be used
> in the way you are describing." is not helpfull at all.
>
> Whereas putting swfobject.switchOffAutoHideShow(); before
> swfobject.registerObject(); seems to be - well - at least a quite good
> work around.
>
> So, do you know why the test.swf (as downloaded) it's not working with
> my German Firefox 3.0.12, German Vista Ultimate SP2, German Flash
> Plugin WIN 10,0,12,36
>
> or do you still insist in saying: "Don't use this as a work around -
> but I I'm not sure about why you shouldn't" :-)
>
> regards
> Heinz
>
>> From: "Buglish" <sjdupr...@gmail.com>
>> Sent: Tuesday, July 21, 2009 9:54 AM
>> To: "SWFObject" <swfo...@googlegroups.com>
>> Subject: Re:FirefoxFlash item invisible
>>
>>
>>
>> > From the link you can see I used the sample text exactly.
>> > Only when I usedFirefoxthe flash object was invisible. The only way
>> > I could get it to work was to add the switchOffAutoHideShow();
>> > function.
>>
>> > What is the real functionality of this function?
>>
>> > On Jul 15, 5:32 pm, Buglish <sjdupr...@gmail.com> wrote:
>> >> See linkhttp://www.bam-sa.co.za/
>>
>> >> On Jul 15, 4:55 pm, "Getify Solutions, Inc." <get...@gmail.com> wrote:
>>
>> >> > This is incorrect information. You must have something wrong in the
>> >> > code you
>> >> > are using. That function is for a different purpose, and should not
>> >> > be
>> >> > used
>> >> > in the way you are describing. It actually refers to the alternate
>> >> > content
>> >> > visibility, not the flash swf object visibility.
>>
>> >> > If you want to post some code here, or better yet, a link, we can
>> >> > probably
>> >> > spot the issue pretty quickly.
>>
>> >> > --Kyle
>>
>> >> > --------------------------------------------------
>> >> > From: "Buglish" <sjdupr...@gmail.com>
>> >> > Sent: Wednesday, July 15, 2009 9:25 AM
>> >> > To: "SWFObject" <swfo...@googlegroups.com>
>> >> > Subject:FirefoxFlash item invisible

Vincent Polite

unread,
Jul 24, 2009, 8:30:11 PM7/24/09
to swfo...@googlegroups.com
I agree with you Kyle, although I preferred my Nintendo cartridge example to illustrate the point.  :)  I'm not sure if the PrimeMarketing redid the code on that page or not.  But yes, it works fine for me as well, so if you are seeing problems there, then something is odd about your setup, PrimeMarketing, which could be anything from local Flash install being wonky to having a lesser version of Flash installed.

Conclusion:  Embed ALL SWFObject code in <HEAD> of HTML page.  This has the double benefit of separating your presentation from your scripting, and it JUST WORKS.

Common Question over the past week:

Some web authors do not have access to the <head></head> portion of their web documents.  Yet they still would like to use SWFObject to embed their Flash.  Up until FF3.5, an inline technique has seemed to work just fine, although it might be more luck than reproducible behavior.  However, FF3.5 consistently fails to show an embedded SWF file when trying to define SWFObject inline in the <BODY> portion of the HTML.

Question to developers:  Should we or should we not provide/solve for a way where they can continue to use SWFObject to embed content?

Currently, observation has shown either wrapping code in a DOMready event or disabling the default show/hide behavior of SWFObject allows FF3.5 to show the expected Flash movie or alt content.  However, these techniques also lead to annoying flashes and other UX foibles that are extremely annoying if not showstoppers for most people.

In order to reliably reproduce this effect, simply take one of the many variations of Flash embed code out there, and move the script elements in line with the Div being affected.  (Not within the div, as that would be terribad).  Attempt to view the file using Firefox 3.5.1 either on a Macintosh or a PC.  At least on my Mac and VirtualBox driven Windows XP PC, everytime I try it, the .swf file fails to load.

Whether I'm running into a latency or race condition based on the specific .swfs I am using as my test case is unknown.  But I can reliably reproduce this condition on my laptop.  I'll get back to you to see if I can do the same on another friends computer to corroborate, though.

Vincent
Reply all
Reply to author
Forward
0 new messages