Hey everyone… new to SWFObject 2.0 and I’m having some issues… I have an index.php that looks like…
<?php
require_once("services/draw.php");
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>player</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="js/swfobject.js"></script>
</head>
<body bgcolor="#ffffff">
<?php
draw();
?>
</body>
</html>
The big part of my draw function is this… (just output swf object code…)
echo " <div id=\"cPlayer\">
";
echo " <a href=\"http://www.adobe.com/go/getflashplayer\">
";
echo " <img src=\"http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif\" alt=\"Get Adobe Flash player\" />
";
echo " </a>
";
echo " </div>
";
echo " <script type=\"text/javascript\">
";
echo " var flashvars =
";
echo " {
";
echo " configUrl: $configUrl,
";
echo " langCode: $langCode,
";
echo " languageUrl: $languageUrl,
";
echo " cid: $cid
";
echo " };
";
echo " var params =
";
echo " {
";
echo " menu: \"false\"
";
echo " };
";
echo " var attributes =
";
echo " {
";
echo " id: \"player\",
";
echo " name: \"player\"
";
echo " };
";
echo " attributes.id = \"player\";
";
echo " swfobject.embedSWF(\"swf/player.swf\", \"cPlayer\", \"650\", \"480\", \"9.0.0\", false, flashvars, params, attributes);
";
echo " </script>
";
(setting of variables omitted)
I know the swf object code works because I just threw it into an HTML and it was fine, but when I build it like so I just get the image and link to download flash player…
Does anyone know how I can fix this?
Thank you,
–d