PDA

View Full Version : *** Count Down Timer ***



The_Vulcan
August 27th, 2003, 10:50 AM
Why won't this work......

I want to create a dynamic text box.
set a (start) and (stop) time.
have the time change along with each frame.

its a blank movie with 150 frames.

this is in frame 1.


count_start = 150;
count_stop = 0;
//************************************************
var output = new TextFormat();
output.font = "Arial";
output.size = 16;
output.align = "center";
//************************************************
this.createTextField("count",0,100 ,100,100,20);
count.setNewTextFormat(output);
//************************************************
if (count_start > count_stop){
count.text = count_start;
count_start = count_start -1;
nextFrame();
}

The_Vulcan
August 27th, 2003, 11:03 AM
Jumped for the help to soon.....

all it needed was

_root.onEnterFrame = function() {



count_start = 150;
count_stop = 0;
//************************************************
var output = new TextFormat();
output.font = "Arial";
output.size = 16;
output.align = "center";
//************************************************
this.createTextField("count",0,100 ,100,100,20);
count.setNewTextFormat(output);
//************************************************
_root.onEnterFrame = function() {
if (count_start >= count_stop){
count.text = count_start;
count_start = count_start -1;
nextFrame();
}
}