Groups | Blog | Home
all groups > flash actionscript > july 2004 >

flash actionscript : Basic Question: how to scale/resize



Rob
7/31/2004 6:14:56 PM
You need to make sure the registration point is along the left side of the
rectangle.

You can do this by opening up the rectangle in Edit mode, and then adjusting
it so it's left edge is lined up with the registration point. (the little
"+" sign in the center of the symbol.)

Best,
Rob




[quoted text, click to view]

alan arthur
7/31/2004 10:37:44 PM
This is, I'm sure, a rather dumb question, but here goes:

I am doing something similar to a progress bar (like a pre-loader).
I need it to grow from left to right. I seem only to be able to get it to grow
from the center <sigh>.

I'm using a rectangle shape converted to a symbol (button).
I'm using Actionscript similar to the following:

_root.myButton._xScale = 50

or

_root.myButton._width = 50

Of course, it's scaling and sizing from the registration point -- the center
of the rectangle instead of from the left edge.

I've moved the transformation point to the left on the stage, but I absolutely
cannot figure out how to get the button to have the same X position and grow to
the right.

I'm sure this is very basic and I'm missing something ridiculously simple.

TIA for your help
alan arthur
8/1/2004 1:08:24 AM
AddThis Social Bookmark Button