PDA

View Full Version : embedding a swf player preview image


Golden Child
06-09-2011, 05:11 PM
Hello,

I'm having some slight trouble embedding a preview pic into a swf player. I attached a preview jpg that fits the swf player using a flashvars. The preview pic I attached in the html is working on some level because I can see a quick flash of the preview image jpg I created when the swf file loads on the browser, but that pic quickly disappears in less than a second. Can anyone tell what is wrong with my mark-up? :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><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="300" height="225">
<param name="movie" value="http://hdflvplayer.net/newplayer/hdplayer.swf" />
<param name="flashvars"
value="file=http://hdflvplayer.net/videos/300.mp4&base
ref=http://hdflvplayer.net/newplayer/&autoplay=false&Preview=Macintosh/T of D/TD swf pic 1.jpg" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="allowscriptaccess" value="always" />
<embed src="../Movies/DoremiSoft Studio/WheatonEditP-20110607-151910/WheatonEditP.swf"
style="width:300px;height:225px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" wmode="transparent"flashvars="Macintosh/T of D/TD swf pic 1.jpg width:300px; height:225px">
</embed></object>
</body>
</html>

domedia
06-09-2011, 06:31 PM
d. Can anyone tell what is wrong with my mark-up? :confused: :

There's a little green bug that snook in. He's actually laughing at me.. j/k ;)

My guess is that the path to the image is wrong. Directory names should not have spaces in them, and you probably need to have a space between attributes.

Golden Child
06-09-2011, 07:28 PM
Hmmm. Still not working. Could it be because I haven't registered and bought the official swf player software I'm using yet? Here is the updated code:


<!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 classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
width="300" height="225">
<param name="movie" value="http://hdflvplayer.net/newplayer/hdplayer.swf" />
<param name="flashvars"
value="file=http://hdflvplayer.net/videos/300.mp4&base
ref=http://hdflvplayer.net/newplayer/ & autoplay=false & Preview=Macintosh/TDswfpic2.jpg" />
<param name="allowFullScreen" value="true" />
<param name="wmode" value="transparent" />
<param name="allowscriptaccess" value="always" />
<embed src="../Movies/DoremiSoft Studio/WheatonEditP-20110607-151910/WheatonEditP.swf"
style="width:300px;height:225px" allowFullScreen="true" allowScriptAccess="always" type="application/x-shockwave-flash" wmode="transparent" flashvars="Macintosh/TDswfpic2.jpg width:300px; height:225px">
</embed></object>
</body>
</html>

gentleone
06-09-2011, 07:54 PM
If you don't want that users on a iPhone, iPad or Android see your movie then mediaelements.js (which can display mp4 btw) I'd recommend to you is useless, but then at least use a good way to embed your Flash file. That script you use now is outdated, unstable and certainly not cross-browser proof.

Better to use swfobject: http://code.google.com/p/swfobject/

Golden Child
06-09-2011, 08:23 PM
If you don't want that users on a iPhone, iPad or Android see your movie then mediaelements.js (which can display mp4 btw) I'd recommend to you is useless, but then at least use a good way to embed your Flash file. That script you use now is outdated, unstable and certainly not cross-browser proof.

Better to use swfobject: http://code.google.com/p/swfobject/
Thanks for the advice. 8)

Now I just need help with the preview pic. Can anybody tell me what would be the best way to add flashvars mark-up here:


<!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><script type="text/javascript" src="../Downloads/swfobject-1/swfobject.js"></script>
<object width="400" height="300">
<param name="movie" value="example.swf">
<embed src="../Movies/DoremiSoft Studio/WheatonEditP-20110607-151910/WheatonEditP.swf" width="400" height="300">
</embed>
</object>
</body>
</html>

edbr
10-23-2012, 08:07 AM
thats not a bot's choice to make. what is the point of these stupid posts

gentleone
10-23-2012, 10:51 AM
what is the point of these stupid posts
My thought is that we should just pull the trigger with these posts. They don't add anything useful to the forum or they do think it does while it's actually total crap. Waste of forum space these posts imo :)

domedia
10-23-2012, 12:53 PM
I completely agree.

edbr
10-24-2012, 01:23 AM
trigger pulled