Set x,y Coordinates with ActionScript
Review
You need to know the instance name of a MovieClip to modify it's properties (like (x,y) position) with ActionScript. Code cannot be compiled if it contains an error.
What We Did
- Created an actions layer
- Set the X position of ball1 with ActionScript
- Set the X and Y positions of ball2 with ActionScript
- Created a compiler error by referencing a MovieClip that doesn't exist
Important ActionScript
ball1.x = 100;
Self-Check for Understanding
Create ActionScript to position the MovieClip in the following example at (100,250):