D
dd
Hi,
I have some code that hides all Flash objects on a page. It's working
fine on IE and Gecko but doesn't work on Safari. There are no errors
(shown in the console) when it runs on Safari, and when I alert the
properties they do show the correctly changed status, but the screen
doesn't reflect that. It maybe a bug in the Flash player for Safari
(I'm using player 9.0) which is just ignoring that it's been hidden.
Here is the Firefox/Safari part of my logic:
for(var i=0;i<document.embeds.length;i++)
if(document.embeds.type=="application/x-shockwave-flash")
document.embeds.style.visibility="hidden";
If I alert the visibility beforehand, it's set to "visible" and
afterwards it's set to "hidden", so clearly the code is doing what's
asked of it, but still the Flash continues to persist on-screen. I
tried a browser resize (with the mouse manually) and it still remained,
so it wasn't just a bad rendering issue. The Flash remains there and
remains animating and interactive. I've considered resizing it to zero
x zero but that may have page alignment issues if that embed was
filling a hole.
Ideas anyone? That code above works on all non-IE browsers I've tried
it on. The IE version of course looks through the objects array and
checks the classid but when it comes to hiding, does the same thing.
I have some code that hides all Flash objects on a page. It's working
fine on IE and Gecko but doesn't work on Safari. There are no errors
(shown in the console) when it runs on Safari, and when I alert the
properties they do show the correctly changed status, but the screen
doesn't reflect that. It maybe a bug in the Flash player for Safari
(I'm using player 9.0) which is just ignoring that it's been hidden.
Here is the Firefox/Safari part of my logic:
for(var i=0;i<document.embeds.length;i++)
if(document.embeds.type=="application/x-shockwave-flash")
document.embeds.style.visibility="hidden";
If I alert the visibility beforehand, it's set to "visible" and
afterwards it's set to "hidden", so clearly the code is doing what's
asked of it, but still the Flash continues to persist on-screen. I
tried a browser resize (with the mouse manually) and it still remained,
so it wasn't just a bad rendering issue. The Flash remains there and
remains animating and interactive. I've considered resizing it to zero
x zero but that may have page alignment issues if that embed was
filling a hole.
Ideas anyone? That code above works on all non-IE browsers I've tried
it on. The IE version of course looks through the objects array and
checks the classid but when it comes to hiding, does the same thing.