PDA

View Full Version : Strings and Numbers


Kelna
03-03-2005, 11:59 PM
So, I have a string, and I am using the string as a countdown timer, and so I was wondering. How do you take a string, lets say we name it "Number", and its value is 100, so say i want the string to countdown from 100. so how do i subtract 1 from 100? I just need to know how to subtract numbers from a string.

Flash Gordon
03-04-2005, 12:53 AM
It can't be a string. 100 isn't a string its a number. "100" is a string.
to count down :
var counter:Number = 100;
onEnterFrame = function() {
counter=counter - 1;
}

ps you can't subtract numbers from sting. What is "Dog" minus 20? Swiss Chess? Doesn't work.