Sean's method will work. However it still fails accessibility when
javascript is disabled. This may or may not be a concern.
if(Browser.Plugins.Flash.version >= 8){
document.writeln('<style type="text/css">div.swiff { display : none;
}</style>');
}
if your a purist and don't like the use of document.writeln you could inject
it in as well.
if(Browser.Plugins.Flash.version >= 8){
var rule = 'div.swiff { display : none; }';
var swiffCSS = new
Element('style').set('type','text/css').inject(document.head);
if(Browser.Engine.name == 'trident') swiffCSS.styleSheet.cssText = rule;
else swiffCSS.set('text',rule);
}
On Thu, Oct 16, 2008 at 2:28 PM, Sean Mehra <[EMAIL PROTECTED]> wrote:
>
> One way to do this is to have a DIV or SPAN contain all the alt
> content and have it initialize with display:none; set in the CSS. Then
> when you create the new SWF, you can check the version number, and if
> it's not greater than that value, tell it to setStyle('display',
> 'block') on that DIV or whatever. That way the ALT content only
> displays when the Flash version check fails. And not before the SWF
> kicks in and displays.
>
> - Sean
>
> On Oct 16, 1:22 pm, stratboy <[EMAIL PROTECTED]> wrote:
> > Why does Swiff let you see the alternative content you put in the
> > flash div, before showing you the swf? It happens in ie and also in
> > Safari.
> >
> > Anyone knows a way to avoid it?
>