PDA

View Full Version : embed code not working


tacticalreaper
12-01-2008, 04:16 PM
<script src="http://mydomain.com/swfobject.js" type="text/javascript" defer></script><div id="intro-1.flv">If you're seeing this text, please upgrade to the latest flash player to display the movie. </div><p><script type="text/javascript" defer>

var so = new SWFObject("intro-1.swf", "intro-1.swf", "320", "280", "8", "#FFFFFF");
so.addVariable("moviename", "intro-1.flv");
so.write("intro-1.flv");</script></p>


this embed code is not working any clue WHY?

jasonJ
12-12-2008, 02:15 PM
1) Download swfobject 2.1:
http://swfobject.googlecode.com/files/swfobject_2_1.zip

2) Copy swfobject.js and expressInstall.swf to the same directory where your movie intro-1.swf.

3) Modify your html code to something like this (also take a look at the swfobject documentation (http://code.google.com/p/swfobject/wiki/documentation)):

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Page title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="swfobject.js"></script>

<script type="text/javascript">
var flashvars = {
moviename: "intro-1.flv"
};
var params = {
bgcolor: "#FFFFFF"
};

swfobject.embedSWF("intro-1.swf", "movie", "320", "280", "8.0.0", "expressInstall.swf", flashvars, params);
</script>

</head>
<body>
<div id="movie">
<p>Alternative content</p>
</div>
</body>
</html>

Verndewd
12-20-2008, 08:18 PM
I swear this is pobably the coolest forum I have seen on this stuff ever. This is exactly what I am needing to learn about .