PDA

View Full Version : Resizing a MovieClip


Raabi
09-22-2009, 01:02 PM
Hello wizards

I am trying to resize a rectangular MovieClip at run-time (dynamically). But, the problem is that it changes the width in both directions (left and right) from its transformation point. The same is the case with its height.

I want the width of the clip increase from left to right or decrease from right to left only.

Any help is appreciated.

rawmantick
09-22-2009, 01:06 PM
So just move the movie clip accordingly.

Raabi
09-22-2009, 01:17 PM
Is there a problem in describing my query or rawmantik has taken it jokingly. I will appreciate if someone takes it seriously, please!

ASWC
09-22-2009, 01:21 PM
No he wasn't joking and gave you the solution but only with a few words and no explanation. When you resize the MovieClip expends according to its registration points which in your case is in the middle. So it expends from the middle evenly. If you want to make it look like it expends from the right or left or whatever you need to move the MovieClip accordingly. So let's say you resize from the right, you move the MovieClip to the right to compensate.

rawmantick
09-22-2009, 01:25 PM
When you resize the movie clip, it's being resized in it's own coordinate system. If inside your movie clip graphical parts are all to the left of the registration point, the movie clip will be resized so it's right side stays static, and left side is moved right obviously. If they are all the right (as usually) - the right side will slide left, and the left side will stay static.

This mechanism is inside of flash player, you won't be able to change it.

So either you move graphical parts inside the movie clip properly, or have a headache synchronizing the resizing and then moving.

It wasn't not a joke.

Think relatively...

Raabi
09-22-2009, 01:30 PM
Thank you so much for the expanation and sorry for the mis-understanding.

Fly high :-)

Regards

henke37
09-22-2009, 05:38 PM
Well, a custom transformation matrix might be able to do it.