Instance Names
Review
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
- Assigned a copy of ball_mc the instance name ball1
- Created another instance of ball_mc and named it ball2
- Tinted ball2
Self-Check for Understanding
Why would each of the following make bad instance names:
- Stage
- two cats
- 2cats
- cat;blue
Highlight to find out the answers:
-
-->
- Stage is a reserved name (Flash has something called a Stage already)
- There is a space in the name
- The name starts with a number
- The name contains a semicolon (other than an underscore, no punctuation is allowed) <--