Set Property options

Is there a way to tween the set property actions?

For example, I have a button that reduces the size of a box by 50%… but instead of making that box just snap to 50% its size, is there a way it can shape tween slowly until it reached the ideal size.

Thanks in advance.
ghjr

with actionscript there is a much better way of doing it than tweening. Are you only interested in scaling, or the would you rather have it play frames forward while over, and backwards while off. This example should help you do what you want to do. Just look at the actions on frame 1.

I figured this code out when I just started playing around with actionscript, it has helped me out greatly for any easing:

property = target-(target-property)/1.2;

Where 1.2 is the division for the distance. The higher this number, the faster the easing, the lower this number the lower the easing. Here’s an example of a script that eases x position:

mc.onEnterFrame = function(){
this._x = 250-(250-this._x)/1.2;
}

You can easily use this code to ease most properties. _x, _y, _xscale, _yscale, _alpha, _width, _height, and so on. Hope this help :slight_smile:

Thanks for the help!! :thumb:

The box that will be changing sizes in this case is not the button… its just a seperate box.

I understood what has been done with that button that you set up and that could be adapted to control this other box I want to resize, but lets say this is the case:

Button 1 - Sets the property of the box 10 wide, 15 high.
Button 2 - Sets the property of the box 15 wide, 18 high.

I was wondering if there was a way to resize the box just using set property (in a smooth way).

Ex. The content box in http://www.synthesis01.com/ that changes size whenever you press WEB, WORK, PERSONAL, etc…

Thanks again!
ghjr

Voetsjoeba, you posted while I was replying to the other one hehehe…

I’ll check it out…THANKS!! :smiley:

ghjr