Tutorials Home
What's New
Top Rated
Submit
myTutes
Random!
Understanding Operators
Author: Eddie Carroll
| Website: http://www.flashkit.com |
Numeric Operators are very straight forward. There are two types - Arithmetic and Comparison which can only be used on NUMBERS!! So if Flash catches you using these on strings prepare yourself for some errors!
Arithmetic Operators
+
-
/
*
|
Add two numbers together
Subract a number from another number
Divide a number by another
Multiply two numbers together
|
Examples:
Set Variable: "units" = 5
Set Variable: "cost" = 10
Set Variable: "price" = 20
Set Variable: "profit" = (price - cost)*5
Comparison Operators
=
<> >
< >=
<=
|
Equals
Not Equals
Greater Than
Less Than
Greater Than or Equal to
Less Than or Equal to
|
Examples:
If (input < number)
Set Variable: "status" = "guess a higher number"
Else If (input > number)
Set Variable: "status" = "guess a lower number"
Else If (input = number)
Set Variable: "status" = "Correct!!"
Go to and Play("end")
End If
| » Level Basic |
|
|
Added: : 2000-09-14
Rating: 8.76 Votes: 62
Hits: 5049
|
| » Author |
|
Eddie is the Content Editor at Flashkit.com and is actually a sentient Gateway Solo 2150xl notebook that suffers from acute lysdexia and caffeine addiction. He is carried on the shoulders of a semi-autonomous human called "Body".
|
| » Download |
|
Download the files used in this tutorial.
|
|
Download (10 kb)
|
|
Get conversion and unzipping tools
for PC and Mac here!
|
| » Forums |
|
More help? Search our boards for quick answers!
|
|
Please rate this tutorial, 10 is the top rating, you can also click the
comments link to read/write a review.
|
|
|