Horizontal Positioning

The x postion of a movieClip is one of many properties that can be retrieved, set, and reset using ActionScript (other properties include the y position, horizontal and vertical scale, transparancy... plus others). You reference any property of a movieClip using mc._property (where mc is the movieClip instance name)

The x property is called _x, so you reference the x position of a movieClip using mc._x (again, where mc is the movieClip instance name).

OK, let's try to put this into practice by setting the x position of the bee movieClip using set variable. That's right, we're using set variable and it's a darn good thing you are already familiar with it. I wish there was an action called "set property," because that is what we are really going to do:

  1. Click Statements > Variables > set variable
  2. The Variable name is bee._x
  3. The Value is 200
  4. Make sure you select Expression

When you see it written out in the main ActionScript window it makes much more sense: bee._x = 200;

We are telling Flash to set the x postion of the bee MovieClip (bee._x) to 200 pixels. Test it out: