I've got a couple of SWF Objects (a clock and a date) to show on a live site, now I am trying to set the site on localhost, but the swf objects disappeared. I tried to put the site on a subdomain, everything works, but I tried and searched on how to make those swf work on local but no success.
Can someone please share some light on how come those swfObjects disappeared on the localhost/wampv only?
SWF objects on index.php
<div id="time">
<?php embed_flash("swf/clock.swf", CLOCK_WIDTH, CLOCK_HEIGHT, "8", '', "flashcontent");?>
<?php embed_flash("swf/date.swf", DATE_WIDTH, DATE_HEIGHT, "8", '', "flashcontent_date");?>
</div>
Here is the code for Flash_function.php
<?php
function embed_flash($name, $w, $h, $version, $bgcolor, $id)
{
$cacheBuster = rand();
$padTop = $h/3;
?>
<style>
a.noflash:link, a.noflash:visited, a.noflash:active {color: #1860C2; text-decoration: none; background:#FFFFFF;}
a.noflash:hover {color:#000; text-decoration:none; background:#EEEEEE;}
.message { width: <?=$w;?>px; font-size:12px; font-weight:normal; margin-bottom: 10px; padding: 5px; color: #EEE; background: orange;"}
</style>
<div id="<?=$id;?>" align="center">
<noscript>
<div class="message">
Please enable <a href="https://www.google.com/support/adsense/bin/answer.py?answer=12654" target="_blank" class="noflash"> JavaScript </a> to view this page properly.
</div>
</noscript>
<div class="message">
You need to update your Flash plugin. Click <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&promoid=BIOW" target="_blank" class="noflash"> here </a> if you want to continue.
</div>
</div>
<script type="text/javascript">
// <![CDATA[
var so = new SWFObject("<?=$name;?>", "<?=$w;?>", "<?=$h;?>", "<?=$version;?>", "<?=$bgcolor;?>","<?=$id;?>" );
so.addParam("quality", "high");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("scale", "showall");
so.addParam("loop", "false");
so.addParam("wmode", "transparent");
so.write("<?=$id;?>");
// ]]>
</script>
I checked Firebug of the site, so on the live site, the code shows like
<div id="flashcontent_date" align="center">
<embed id="undefined" width="240" height="50" wmode="transparent" loop="false" scale="showall" allowscriptaccess="sameDomain" quality="high" name="undefined" src="swf/date.swf" type="application/x-shockwave-flash">
</div>
but on the localhost it shows like
<div id="<?=$id;?>" align="center">
<embed id="<?=$w;?>" width="<?=$h;?>" height="<?=$version;?>" wmode="transparent" loop="false" scale="showall" allowscriptaccess="sameDomain" quality="high" bgcolor="<?=$id;?>" name="<?=$w;?>" src="<?=$name;?>" type="application/x-shockwave-flash">
</div>
Anything I am doing wrong, any help is appreciated.