View Full Version : Play button separate from flash player

02-20-2008, 06:10 PM
I would like to activate a flash video with a play button that is located somewhere else on a web page, other than the player itself, like an image maybe. The player is transparent and is not visible.
Can anyone help me with coding for that?

02-21-2008, 01:49 AM
So when you click the image the player becomes visble and not transparent? I think the best thing to do would be to use javascript to write the flash player to the page dynamically on click of a button. You can do this easily with SWFObject.

02-21-2008, 02:52 AM
By transparent I mean that I have video shot on a green screen and exported the alpha channel, so the player is there but you don't see it until play is hit then the charector shows.
Thanks for the tip. Can you help me out with the coding or send me in a direction?

02-21-2008, 03:32 AM
First you will need swfobject. Google that, should be the first result.

Once you figure out how to put flash on a page with swfobject you just need to create a javascript function

<script type="text/javascript">
function writeMovie()
var so = new SWFObject("movie.swf", "mymovie", "400", "100&#37;", "8", "#336699");
so.addParam("quality", "low");
so.addParam("wmode", "transparent");
so.addParam("salign", "t");
Then your image would look like

<img src="someimage.jpg" onclick="writeMovie()" alt="">
You would probably need to have the video autoplay this way it shows up when you write it to the screen.

02-21-2008, 03:53 AM
Awesome, thank you!:thumbsup:
Worked perfectly.