Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Greater and Less than in flash

Posted on 2009-04-06
3
Medium Priority
?
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 19

Accepted Solution

by:
quizengine earned 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

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…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Suggested Courses

722 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