I've noticed this happening on all my sites, on all browsers. I can't work out why, but I do know that if I use swfobject.js' "Static" method of embedding Flash, it stops happening (as opposed to SWFObject API's default "dynamic" method).

See the documentation for more info: http://code.google.com/p/swfobject/wiki/documentation

Anyway I'm going to be making changes to fix this! ;)

My initial thoughts are to make another theme function, say theme_swfobject_api_static() that creates the static embedded SWF code.

The other option would be to pass a parameter 'dynamic' or 'static' to the existing theme function and then branch accordingly, but that would render old calls invalid (i.e. breaks the API).

I am modifying the 6.x branch, but there's no Version available in the issue options for 6.x, so I have left it as 5.x-2.0 for now.

Any thoughts?

Comments

Mark Theunissen’s picture

Status: Active » Closed (won't fix)

Hmm, it appears I may have been wrong about static embedding method fixing this... can anyone confirm that it happens to them, and is not just me??

Mark Theunissen’s picture

Status: Closed (won't fix) » Closed (fixed)

Ok I found the problem! It was my browser ;)

For some reason having Adblock Plus plugin installed interferes with swfobject.js. The strange thing is that the jQuery Flash Plugin doesn't seem to suffer from the same flicker effect, which is what threw me off.

But uninstalling Adblock Plus has removed the flickering effect.

Hope that helps someone in the future.

medway’s picture

Mark,

Hi I'm having a similar issue but just with FF3.

If you take a look at the site in question:

www.deepershadesstudios.com

On the mixing-mastering and sound-design pages I have SWFObject 2 being used.

Sometimes just the first time the page loads the screen flashes white. Other times
it seems to flash white everytime these pages are loaded.

All is fine in IE7 and Safari.

Any ideas?

edit: have just tried using direct embed and the jquery flash embed and both have the same
issue.

edit2: this seems to be an FF issue...

I did a test by going to the 1pixeloutsite:

http://www.1pixelout.net/code/audio-player-wordpress-plugin/

on the right is a menu area called "Code" and these menu items-

# Audio Player Wordpress plugin
# appConstants Mach-II plugin

the top one is the one you are on now, so if you click the "...mach-II" link
you will see it load but the whole screen doesnt flash white, but then
if you click the top one, "audioplayer...", then when that one loads back
the screen should also flash white.

If i do this same test in IE then its no problem, so something to do
with FF. the problem is that my site is almost black so the
white flash more obvious...

Thanks.

Mark Theunissen’s picture

I had more of these problems. Not sure what was causing it, but it seems to be particularly bad in Firefox. I now use the jQuery Flash plugin which can be activated using SWFTools module. This one seems to give the best results!

I wish I knew what the problem was, but for now, changing the flash embed method seems to do the trick.

Sorry I can't be of more help. If you find out, please post your results here and I'll do the same.

arthurf’s picture

Which version of the swfobject library are you using?

Mark Theunissen’s picture

I found that SWFObject 1.5 didn't cause a problem, but 2.1 did.

It seems to be in Firefox only. I have posted on the Mozilla forums, awaiting a response...

arthurf’s picture

Is this the problem described in #16 here: http://code.google.com/p/swfobject/wiki/faq ?

Mark Theunissen’s picture

#16 is "Why does Firefox load my SWF twice?"

I don't think that's related. Here is the problem as I described it on the Firefox forum:

Hi everyone

I'm a web developer and I'm having an issue with Firefox, where it reloads the entire page instead of just the parts that have changed. This only happens on pages with Flash embedded.

For example, on my site, I have a menu with a number of links, say "Home" and "About". If I leave out the Flash elements, and move between the pages by clicking the links, Firefox does not reload the entire page (i.e. the banner, the menu, the sidebars, etc), it only reloads the parts that change (the middle section). This is the desired behaviour.

If I then embed Flash elements on the pages, the browser window completely reloads when I click the links (i.e., it goes white, and every element is then re-drawn).

Could someone help me diagnose this please? I have searched Google and found very little information.

Since I'm a developer, I'm happy to work this out if someone could give me a hint. For instance, under what conditions does the browser reload the entire page instead of just the parts that have changed? If I knew that, I could work it out.

Thanks and regards,
Mark

arthurf’s picture

Hey Mark- thanks for all your work on this. Can you post the url as well so that I can keep an eye on the thread? This isn't happening to me on any of my sites, so I'm wondering what is going on.

Mark Theunissen’s picture

No problemo. I hope to one day get to the bottom!

Here is a link to a demo of the problem.

http://nestle-bit.digitalpeopleonline.com/

Try moving between the three menu options in all browsers. Do you notice the flicker in Firefox?

Here is the Firefox forum topic:

http://forums.mozillazine.org/viewtopic.php?f=38&t=931485

Mark Theunissen’s picture

Hmm... I've read through the bug reports that are linked from issue #16 on that link you sent... maybe it is the problem? Is there any way to check?

Mark Theunissen’s picture

@medway: It's annoying because it's so temperamental. Disabling my addons solves the problem in my example above, but not on your Mixing and mastering site.

arthurf’s picture

I'm still not able to duplicate this bug- anybody who isn't using FF3 seeing this issue?

Mark Theunissen’s picture

Pretty sure it's a SWFObject bug. I've moved to jQuery Flash Embed so feel free to close the issue.