I'm new at this.
I created a flash movie that I need to show to each website visitor once in 24 hours (ie cookie expires in 24 hrs). I created the following php file but the flash doesn't show (in the html version it does); but upon reloading the page (since the cookie is now set), I do see the test message "Cookie is set, so Flash won't show". Am I using the escape character incorrectly? Or is something else the issue? Couldn't find an answer on the forum.
Code: Select all
<? ob_start(); ?>
<!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>
<title></title>
<script type="text/javascript" src="jquery126.js"></script>
</head>
<body>
<?php if (!isset($_COOKIE["showflashonce"])){
setcookie("showflashonce","showflashvalue",time()+86400);
echo "<div id=\"toppanel\" style=\"text-align:center;position:absolute;z-index:20;width:100%;height:450px;display:none;\" ><object width=\"1000\" height=\"400\" style=\"background:#000\"><param name=\"movie\" value=\"http://www.mydomain.com/ms.swf\"><param name=\"wmode\" value=\"transparent\" /><embed src=\"http://www.mydomain.com/ms.swf\" width=\"1000\" height=\"400\"></embed></object>";
echo "<div><a href=\"#\" class=\"toppanelclose\" style=\"padding: 0 30px 10px 30px; background: #af0000;color:#fff;border:2px solid #af0000; font-weight: bold;\">Close [X]</a></div></div>";
echo "<script>var cl=0;\$(document).ready(function() { \$(\'#toppanel\').slideDown(800); window.setTimeout(function() { if(!cl) \$(\'#toppanel\').slideUp(); }, 25000); \$(\'a.toppanelclose\').click(function(){\$(\'#toppanel\').slideUp();cl=1;return false;}); });</script>";
}
else {
echo "Cookie is set, so Flash won't show.";
}?>
</body>
</html>
<? ob_flush(); ?>Thanks in advance.