Solved

Greater and Less than in flash

Posted on 2009-04-06
3
149 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 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

623 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