View Full Version : how to add timer for drag & drop game..
10-13-2003, 05:09 AM
i need help on drag and drop game...
i have done the drag and drop function but along with this, timer has to be set after user finishes the drag & match, it should give finish alert and time taken for this game is to be sent to some external file or some database...
can it be done?
i have attached the .fla file also..
10-13-2003, 01:56 PM
without looking at your file I will explain the basics of getting a timer.
// first thing you do is get the start time.
startTime = getTimer();
// when you want to stop the clock you use getTimer again
endTime = getTimer();
// you can then find out the time passed by simple subtration
secondsPassed = (startTime-endTime)/1000;
Try to work that into your file.
10-15-2003, 03:40 AM
Hi, thanks 4 u r reply
i wanted to disply the time on starting and after finish the matches time shoud stop and give finish Promt and Redo Promt
and if currect the result should be sent database...
if not finish the game .... reset and play again...
Is this is posible... in Flash MX
Please help me in this..
10-15-2003, 05:43 AM
u can activate the startTime with the start button of the game
and activate the end when the game ends
then substract, convert the millisecods to the time u want
and please don't crosspost threads
I will remove the other one
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.