I have come across some strange behaviour when setting
wmode to transparent and setting the div visibility to
hidden and/or setting the absolute position off of the
visible area of the browser window.

1. If wmode is set to transparent and the flash movie
is wrapped in a div with a visibility set to hidden,
the flash movie will not run. This seems to be true on
both IE & FF (windows).

2. If wmode is set to transparent and the flash movie
is wrapped in a div with a visibility set to visible,
the flash movie will run on both browsers, EXCEPT that
if the absolute position has been set off screen
(negative) and NO portion of the flash movie shows,
then FireFox does not run the movie but IE still does.


To test, create the following swf and html files:

1. test.swf (set dimensions to 100x100)
getURL("javascript:alert('this is a test');");
stop();


2. test.html
<html>
<body>
<div style="position:absolute; visibility:visible;
width:100px; height:100px; left:-100px; top:-100px;" >
    <object
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0";
width="100" height="100" id="test" align="middle">
    <param name="allowScriptAccess" value="sameDomain"
/>
    <param name="movie" value="test.swf" />
    <param name="quality" value="high" />
    <param name="wmode" value="transparent" /> 
    <embed src="test.swf" quality="high"
wmode="transparent" bgcolor="#ffffff" width="100"
height="100" name="test" align="middle"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer";
/>
    </object>
</div>
</body>
</html>

The above example should work in IE but fail in FF. If
you change the absolute position to (left:-99px;
top:-99px;) so that 1 pixel shows, then FF will work.
>From what I have gathered, it appears that the swf
will not even load unless it is visible on the screen
- of course IE and FF seem to interpret that
visibility differently...

I have a flash script that needs to pop out on demand
using wmode=transparent. Currently my only work around
is to show 1px x 1px for firefox but this seems
annoying. I could also do an onload event which hides
the div or moves the div as this would ensure that the
swf has loaded first - but this is even more annoying.

Any thoughts?

Thanks,
Jason


                
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to