Flash Countdown

Hello,

I found a great flash countdown script through a tutorial, here is the action script-

this.onEnterFrame = function() {

var today:Date = new Date();
var currentYear = today.getFullYear();
var currentTime = today.getTime();

var targetDate:Date = new Date(currentYear,11,25);
var targetTime = targetDate.getTime();

var timeLeft = targetTime - currentTime;
var sec = Math.floor(timeLeft / 1000);
var min = Math.floor(sec / 60);
var hrs = Math.floor(min / 60);
var days = Math.floor(hrs / 24);
sec = string(sec % 60);    
if (sec.length < 2){
    sec = "0" + sec;
}
min = string(min % 60);
if (min.length < 2){
    min = "0" + min;
}
hrs = string(hrs % 24);
if (hrs.length < 2){
    hrs = "0" + hrs;
}
days = string(days);

var counter:String = days + ":" + hrs + ":" + min + ":" + sec;
time_txt.text = counter;

}

This works fine. However, I am attempting to change the targetDate by retrieving the last day of the month and counting down to that. Right now it counts to christmas. I know how to get the last day of the month through PHP, so I was thinking I could send the variables to the flash document and somehow replace 11,25 with $n (which is the month variable in my php) ,$lastday .

Here is the PHP


$m = date('m');
$n = date('n');
$month = date('F');
$y = date('Y');
$find = mktime(0, 0, 0, $m, 0, $y);
$lastday = strftime("%d", $find);
print "&n=$n&lastday=$lastday";

I have tried loading the php file and then placing a variable in but I can’t figure it out and I am fairly new to actionscript.

Anything will help! Thanks