clock and date showing on a live site but not on localhost
Posted
by
grumpypanda
on Stack Overflow
See other posts from Stack Overflow
or by grumpypanda
Published on 2012-07-02T02:59:19Z
Indexed on
2012/07/02
3:15 UTC
Read the original article
Hit count: 210
I've got clock.swf and date.swf working fine on a live site, now I am using the same code to set up a local develop environment. Everything is working well except the clock.swf and date.swf stopped working on localhost.
Two same yellow errors "You need to update your Flash plugin. Click here if you want to continue." but of course my Flash player is up to date since the live site is working fine. I'll post the code below which I think has caused the error.
I've been searching online for the last couple of hours but no luck, anyone has got into an issue like this before? What can be the possible cause?
Any help is appreciated.
This is on the index.php, I can post more code here if needed.
<?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");?>
configure.php
define('CLOCK_WIDTH', '450');
define('CLOCK_HEIGHT', '');
define('DATE_WIDTH', '440');
define('DATE_HEIGHT', '');
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;?>");
so.addParam("quality", "high");
so.addParam("allowScriptAccess", "sameDomain");
so.addParam("scale", "showall");
so.addParam("loop", "false");
so.addParam("wmode", "transparent");
so.write("<?=$id;?>");
// ]]>
</script>
© Stack Overflow or respective owner