Instance Names


We can differentiate between multiple copies of the same object using Instance Names. Each instance of an object has it's own properties (like tint, X position, Y position) separate and independent from other objects.

What We Did

  1. Assigned a copy of ball_mc the instance name ball1
  2. Created another instance of ball_mc and named it ball2
  3. Tinted ball2

Self-Check for Understanding

Why would each of the following make bad instance names:

  1. Stage
  2. two cats
  3. 2cats
  4. cat;blue

Highlight to find out the answers:

  1. Stage is a reserved name (Flash has something called a Stage already)
  2. There is a space in the name
  3. The name starts with a number
  4. The name contains a semicolon (other than an underscore, no punctuation is allowed)
  5. <--