Animation

  1. Home
  2. Computing & Technology
  3. Animation

ActionScripting Basics: Whats the difference between = and ==?

By Adrien-Luc Sanders, About.com

3 of 3

==

x = y
if (x ==y) {
gotoAndPlay(3) ;
}

In the if statement above, however, a double equal sign is used (==) to compare the two and return a value: true or false. Flash checks to see if x is equal to y; if it is, it returns true, and the conditions inside the if statement are executed. If x and y are not equal, then Flash returns false, and the if statement is not executed.

Explore Animation

About.com Special Features

Animation

  1. Home
  2. Computing & Technology
  3. Animation
  4. Flash Animation Tutorials
  5. ActionScripting Basics: What’s the difference between = and ==?

©2009 About.com, a part of The New York Times Company.

All rights reserved.