Hiya, I can't see the wood for the trees with this one. I;m getting an error message of type mismatch when I try and add 1000 onto the date to increase it by 1 second for a timer.

I'm sure I am doing something wrong that is patently obvious but I'm not sure what and this is driving me mad!

Any help really appreciated, i have to get this working today :)

here's my code:


public function update():Void
{
currTime +=1000;// gives Type mismatch in assignment statement: found Number where Date is required.
}


public function phpLoaded():Void
{       
        //receives time since jan 1970 from php
        var str:String = arguments.caller.lv.toString();
        var myA:Array = new Array();
        myA = str.split("=")
        //get computer time
        trace("servertime:"+myA[0]);
        connectedTime = new Date();
        connectedTime += myA[0];
        currTime = new Date();
        currTime = connectedTime;
        trace("====="+currTime.toString());
        clearInterval(secondInterval);
        update();
        secondInterval = setInterval(this, "update", 1000);
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to