nice one.
thanks Keith :)
have a great weekend
On 22 Aug 2008, at 16:53, Keith Reinfeld wrote:
Ali,
currTime = new Date(currTime.getTime() + 1000);
or
currTime.setTime(currTime.getTime() + 1000);
Regards,
-Keith
http://keithreinfeld.home.comcast.net
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Ali Drongo
Sent: Friday, August 22, 2008 10:05 AM
To: Flash Coders List
Subject: [Flashcoders] Quick Date question, how to add 1 second to
Date?
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
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
--------------------------------------------------------------------------
Alistair Colling
Interactive Developer
FPP Brand Communications (Newcastle upon Tyne)
The Courtyard
Dinsdale Place
Sandyford
Newcastle upon Tyne NE2 1BD
Telephone: +44 (0)191 261 6662
Fax: +44 (0)191 233 2511
This transmission is confidential and intended solely for the person or
organisation to whom it is addressed.
It may contain privileged and confidential information. If you are not the
intended recipient, you should not
copy, distribute or take any action in reliance on it. If you have received
this transmission in error, please
notify the sender at the e-mail address above.
FPP Design Limited. Reg. Office: The Courtyard, Dinsdale Place, Sandyford, Newcastle upon Tyne NE2 1BD.
Registered Number 3775564. Registered in England and Wales. Visit our website at http://www.fpp.net/
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders