BenWorbs
08-21-2007, 11:16 AM
Hello,
I've created a little count up anumation to be added to a banner I'm working on but can't get the numbers to format in teh way i would like
Here is my script
var count:Number = 22.457;
var maxNum:Number = 26.457;
var num:Number = .45;
this.createTextField("txt",0,0,0,100,50);
txt.multiline = false;
txt.font = "Bliss Medium";
txt.size = 10;
onEnterFrame = function () {
count += num;
if (count>=maxNum) {
num = 0;
txt.text = "26.457";
} else {
txt.text = count/(maxNum/26.457);
}
};
Could someone possibly tell me where I'm going wrong please?
Thankyou in advance
Ben
I've created a little count up anumation to be added to a banner I'm working on but can't get the numbers to format in teh way i would like
Here is my script
var count:Number = 22.457;
var maxNum:Number = 26.457;
var num:Number = .45;
this.createTextField("txt",0,0,0,100,50);
txt.multiline = false;
txt.font = "Bliss Medium";
txt.size = 10;
onEnterFrame = function () {
count += num;
if (count>=maxNum) {
num = 0;
txt.text = "26.457";
} else {
txt.text = count/(maxNum/26.457);
}
};
Could someone possibly tell me where I'm going wrong please?
Thankyou in advance
Ben