Forum Moderators: open

Message Too Old, No Replies

how to use the flash in background?

         

PHPycho

12:46 pm on May 27, 2007 (gmt 0)

10+ Year Member



Hello forums!
i have some problems regarding flash file..
i want to include the flash file in a page...what i want is i want to make a layer above the flash file so that something could be displayed above the flash...
how to perform such..
awaiting for your help..
thanks in advance ..

StupidScript

11:03 pm on May 29, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I've never been able to get Flash to sit anywhere but on top. I hope someone has a trick for doing this.

Achernar

11:27 pm on May 29, 2007 (gmt 0)

10+ Year Member Top Contributors Of The Month



You have to add a parameter to make the flash object "transparent". This allows elements floating in front to be visible.
Add (for IE):
<param name="wmode" value="transparent">

and (for other browsers) add the attribute:

wmode="transparent"
to the <embed> tag.

<object>
<param name="movie" value="http://....swf">
<param name="wmode" value="transparent">
<embed wmode="transparent" src="http://....swf">
</object>

Josefu

11:27 am on May 31, 2007 (gmt 0)

10+ Year Member



I'm sorry, but, as far as I know there is no way to make anything sit on top of a Flash object: as it is a plug-in, it is the last thing in the page to load, and this in all browsers and platforms, so it always takes a place on top of every other previously-loaded element in the page.

Perhaps through javascript you could experiment with the z-index of the page's <div> elements (move the flash to "under" after the page is loaded?), but even in this I have not heard of anyone having any success. Even if you do manage to make the Flash movie transparent (and this does not work in every browser), there is still a problem of flickering in some computers (speed) and platforms.

Although I have looked extensively into the problem in the past, it has been some months since I have searched for any update to the above. If anything I have written is no longer accurate, please correct me!

Achernar

1:32 pm on May 31, 2007 (gmt 0)

10+ Year Member Top Contributors Of The Month



Here is a proof of concept :

<html>
<body>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
viewastext="" height="89" width="238">
<param name="movie" value="http://www.dargaud.fr/media/tra_media_178.swf">
<param name="wmode" value="transparent">
<embed wmode="transparent" src="http://www.dargaud.fr/media/tra_media_178.swf" height="89" width="238">
</object>
<div style="position:absolute; top:20px; left:20px;">
<a style="color:red;" href="#">Cliquer ici text text text text text text text text text text text text text text text text</a>
</div>

</body>
</html>

The link is displayed on top of the flash object.

[edited by: Achernar at 1:36 pm (utc) on May 31, 2007]

StupidScript

5:04 pm on May 31, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Works for me with FF2 and IE6.

Josefu

7:31 am on Jun 1, 2007 (gmt 0)

10+ Year Member



Hmmm - ça marche pour moi aussi. I also tried with an image. No flickering, either. It must be the 'absolute' positioning - or have they simply fixed the problem in the latest flash versions? Anyhow, apologies: I spoke too soon.

welkin

5:21 pm on Jun 15, 2007 (gmt 0)

10+ Year Member



it is said that using wmode value=opaque would also achieve the same effect.

here's an detailed explanation:
[communitymx.com...]

which includes a great comparison:
[communitymx.com...]