i can’t get my flash poll to read the php var that tests for cookies. any help? here’s my actionscript (on a movie clip):
onClipEvent(load){
cookie_lv = new LoadVars();
cookie_lv.load(“cookie.php”);
cookie_lv.onLoad = function(success:Boolean){
var cookieCheck:Number = this.checker;
if(success) {
trace("cookieCheck = " + cookieCheck);
if(cookieCheck){
content_mc.gotoAndStop(“show”);
}
}else{
trace(“didn’t work!”)
}
}
}
here’s the php:
<?php
// Check if cookie exists
if(!isset($_COOKIE['tbmpollchecker'])){
// Set a cookie
// Cookie name: tbmpollchecker
// Cookie value:
// Cookie expire: one week
setcookie ("tbmpollchecker", "cookie exists", time() + (60*60*24*7));
$check = 0;
}else{
$check = 1;
}
print 'checker='.$check;
?>
here’s the output of the trace command:
cookieCheck =
//this is published as flash 6 . in flash 8, the output is
cookieCheck = undefined
so, any ideas? you can run the php at http://www.castlestudio.net/tbm/poll/cookie.php
thanks for your help!