Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
I'm having a minor problem inserting a preview image into a swf player on my website. The swf player has no image before you click the play button and just displays nothing on the player screen when you first log onto the page. What do I need to add to my html so I can add a preview image before clicking play on the swf movie control bar? Here is the swf movie html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body><object id="whatever" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="225" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0">
<param name="src" value="example.swf"/>
<param name="bgcolor" value="none"/>
<param name="quality" value="best"/>
<embed name="whatever" src="../Movies/DoremiSoft Studio/WheatonEditP-20110607-151910/WheatonEditP.swf" width="300" height="225" bgcolor="none" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object>
</body>
</html>
 

HomeBru Studios

macrumors member
Jun 4, 2008
84
2
View the page source of this web page (http://contractornews.org/). I did what you are asking about for the video in the right sidebar (the user didn't like the INDUSTRY STANDARD play button covering his face).

Although this particular use is for a YouTube video, the same idea should apply to an SWF video...
 

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
Forgive me, I'm a newbie at web development. What do I need to add to my html to be able to add a preview graphic?
 

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
Okay. I took note of some of the html for the swf preview graphic. Now that I have changed some of my html and added the swf preview graphic, the preview graphic shows up left of the swf player instead of showing the preview graphic. Is some CSS necessary here? :confused:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>

<body></li><li id="youtube" class="widget-container widget_youtube"><img id="video_still" src="../../../T of D/TD swf pic 1.jpg" style="cursor:pointer;" /><object id="whatever" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="300" height="225" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0">
<param name="src" value="example.swf"/>
<param name="bgcolor" value="none"/>
<param name="quality" value="best"/>
<embed name="whatever" src="../Movies/DoremiSoft Studio/WheatonEditP-20110607-151910/WheatonEditP.swf" wmode="transparent" width="300" height="225" bgcolor="transparent" pluginspage="http://www.adobe.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
</object></li>
</body>
</html>
 

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
I successfully placed the preview image in place on my site. However, now the player doesn't play when I scroll over the preview image. What could be wrong here:

<li id="youtube" class="widget-container widget_youtube"><img id="video_still" src="../../../TDswfpic2.jpg" style="cursor:pointer;" /><object width="300" height="225" style="display:none;">
<param name="movie" value="example.swf">
<param name="wmode" value="transparent"></param>
<embed src="../Movies/DoremiSoft Studio/WheatonEditP-20110614-164244/WheatonEditP.swf" wmode="transparent" width="300" height="225">
</embed>
</object></li>
 

Ride9650

macrumors 6502
Jun 29, 2007
352
0
I successfully placed the preview image in place on my site. However, now the player doesn't play when I scroll over the preview image. What could be wrong here:

It's because you put your image over the player.

you need the poster attribute in a param tag like this

PHP:
<param name="flashvars" value="poster=path to your image"/>
 

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
Still not working. :confused: Could it be the player I'm using? This is what I have now:

<object width="300" height="225">
<param name="movie" value="WheatonEditP.swf">
<param name="allowfullscreen" value="true">
<param name="allowscriptaccess" value="always">
<param name="flashvars"
value="poster="file:Macintosh/video_still.jpg"/>
<embed src="../Movies/DoremiSoft Studio/WheatonEditP-20110614-164244/WheatonEditP.swf" width="300" height="225"allowscriptaccess="always"
allowfullscreen="true" flashvars="file:Macintosh/video_still.jpg">
</embed>
 

Ride9650

macrumors 6502
Jun 29, 2007
352
0
Still not working. :confused: Could it be the player I'm using? This is what I have now:

1.Are you trying to use a local image file? You need to upload it to your webserver.

2. Secondly, take out the extra quotes.

Should look something like this:
PHP:
<param name="flashvars"
value="poster=Macintosh/video_still.jpg"/>
 

Golden Child

macrumors newbie
Original poster
Mar 1, 2011
11
0
1.Are you trying to use a local image file? You need to upload it to your webserver.

2. Secondly, take out the extra quotes.

Should look something like this:
PHP:
<param name="flashvars"
value="poster=Macintosh/video_still.jpg"/>

Thanks for replying. Yes, I am trying to use a local image on my computer seeing as I have not uploaded the site live to the web yet. That explains a lot.
 

Ride9650

macrumors 6502
Jun 29, 2007
352
0
Thanks for replying. Yes, I am trying to use a local image on my computer seeing as I have not uploaded the site live to the web yet. That explains a lot.

Ah. Well first off the proper format is:

file://<path to the image>

secondly, its generally bad practice to use absolute urls as, as you might imagine, once you upload everything, you'll have to go through and change all your links. it's best to use what's called a relative url.

say your main folder contains:

- index.html
- mygreatthing.swf
- images(imagine it's a folder)

and that inside that images folder is your preview image. So the proper relative path would then be:

"images/mygreatthing_preview.png"
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.