i have placed the following code in frame 1 which then displays the current time in relevant dynamic text box.
Any ideas what i have missed because the time doesn't update itself-it just stays at the time you entered the page at
now=new Date()
//txt1.text=now.getHours()+":"+now.getMinutes()+":"+ now.getSeconds()
h=now.getHours()
if (h<10){
h="0"+h
}
m=now.getMinutes()
if (m<10){
m="0"+m;
}
s=now.getSeconds()
if (s<10){
s="0"+s
}
ms=now.getMilliseconds()
if (ms<10){
ms="0"+ms
}
Hmm. The compiler let you get away with not using semicolons?
Anyway, you need a loop using onEnterFrame() or some other means of repeatedly executing the code. A low frame rate is okay (I used 12) since you're only looking a minutes or seconds, and reduces cpu processing load. I was going to post a solution zip file, but I can't open the manage attachments window - oops, now its working. Enjoy .
Peter
P.S. Alternatively, you can add a second key frame and create a "gotoAndPlay(1);" loop.
Last edited by pherbrick; 08-25-2005 at 01:03 PM.
Reason: Fixing solution description, in italics
4.7.2 version attached; I kept my old executable .
Anybody posting for help, please mention if you're not using the latest release version of KoolMoves. The trial version is not always the latest release version, so if you're using the trial version please make a note of the version number under the Help Menu > About KoolMoves.