PDA

View Full Version : [FMX] Resizing question(s)



cpgenius
October 31st, 2004, 06:36 AM
Hi,

I am trying to emulate an effect seen at: http://www.hhgrt.hu/halgyogyaszat/flash.html

Now, I could simply make a box that expands and contracts, but the problem I'm having is keeping the other mc boxes a set distance away on both sides at all times while one box shrinks and another expands. Does anyone know how to go about this? I've gotten it to stay away in a drag example, but I can't get it to constantly stay away while the animation is expanding/shrinking.

On a less important note, I've tried scaling (expanding/shrinking) the boxes using actionscript via the x/yscale properties, but I noticed it scales ... uniformly, I think the word is. To understand what I need, transform a box, circle, whatever and then hold ALT + transform it. It expands only on that one particular point. I assume there is a way to do this in a similar manner, but I'm clueless as to what it may be.

Help! :)


Thanks-

dbarbarian
October 31st, 2004, 05:29 PM
FInd half the width of the expanding box, find the x position of that box, find half the width of the box right besides it, then just add them together to get the x postion of the box right beside it.
=)

cpgenius
November 1st, 2004, 06:48 AM
FInd half the width of the expanding box, find the x position of that box, find half the width of the box right besides it, then just add them together to get the x postion of the box right beside it.
=) dbarbarian,

Okay, I've gotten it to follow along properly, but that is only if the first box is resized dynamically. The problem with resizing dynamically is that is resizes from the center. Obviously, there's a way to have it stretch from a corner point, but I haven't found anything, yet.

On a side note, how did you come up with such a formula?

I really appreciate your response :D

Thanks-

cpgenius
November 2nd, 2004, 04:16 AM
Well, hopefully, someone can help me out before tomorrow. I'm in a tight spot as far as time is concerned.

Cheers-

3rdeye
November 2nd, 2004, 05:09 AM
to have it grow from a certain point... change the registration point. (it's the white circle on the object, when you select it on the stage)...