Solved

Greater and Less than in flash

Posted on 2009-04-06
3
146 Views
Last Modified: 2013-11-11
Ok not sure how to ask this but here goes, in flash I have variables that are numbers and the I try to use a statement using greater then it works perfect when you have a number with two digets like 88 is greater than 80 that works but if I have 88 and the next number is a three digit number like 103 it shows 88 being greater. Exapmle below:
102 and 90 flash is showing 90 to be greater or 90 and 97 it will show 97 it just screws up when a number has three digits.
0
Comment
Question by:ucohockey
3 Comments
 
LVL 19

Accepted Solution

by:
quizengine earned 500 total points
ID: 24076133
I think your numbers are not numbers, but strings. This is very likely if they are imported from an external file. You can *force* them to become numbers like this...

myVar = Number(myVar);

Try doing that to each of your variables and then compare them and see what's changed.
0
 
LVL 39

Expert Comment

by:blue-genie
ID: 24076244
yeah i'd say the same.

to check do a typeof

i.e trace(typeof variablename) - will tell you if its a String or not.
0
 

Author Comment

by:ucohockey
ID: 24076257
No it is a string I will try that thanks for the help.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question