# Negative number and positive numbers?

**URL:** <https://forum.kirupa.com/t/negative-number-and-positive-numbers/216424>\
**Category:** flash\
**Created:** [February 16, 2007, 8:16am UTC](https://forum.kirupa.com/t/negative-number-and-positive-numbers/216424 "2007-02-16T08:16:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hunson](https://avatars.discourse-cdn.com/v4/letter/h/977dab/32.png) [@Hunson](https://forum.kirupa.com/u/Hunson)\
**Post date:** [February 16, 2007, 8:16am UTC](https://forum.kirupa.com/t/negative-number-and-positive-numbers/216424/1 "2007-02-16T08:16:56Z")

</div>

hey how do you tell flash when a number is positive and negative?

i have thing number input text field where there’s another selection field on the side where users can select a - or +.

if the user select a -, i need to let flash know the number in the input text field is a negative.

there’s plenty of possibility i don’t even know how it goes, but my script looks a little like this:

//// false = negative, true = positive  
var selection:Boolean = false  
myMC.onEnterFrame = function(){  
if(selection == false){  
result.text = Number(inputField.text) //but in negative//  
} else {  
if(selection == true){  
result.text = Number(inputField.text) //but in positive//  
}  
}

sorry for making it so long, i just wanna make sure you guys know what i’m talking about 🙂  
help me out!

note: the number HAS to be negative, there’s some other calculation going afterwards, i can’t just fake it with a string “-”.
