Smooth Resize

Hi everybody

how can i resize a movie clip via actionscript, but i want the resize to be smooth, like a tween, but via actionscript, and that first, it loads the last size of the mc, and then that would be the first position, and basing on it, then, apply the resize

you can use an onEnterFrame action trigered by a buton or variable on the mc to scale the mc. Like this:

onClipEvent (enterFrame) {
	if (trigerVariable == value) {
		if (this._xscale < sizeIn%ToGrow){
			this._yscale++;
			this._xscale++;
		}else if (this._xscale >= sizeIn%ToGrow){
			break;
		}
	}
}

not tested tho:-\ , but I´m pretty sure it will work

:frowning: i dont get it

what is triggerVariable???

and i want to change only the x size, an another question, is this possible using pixlels orhas to be % ??

the effect iwant to achieve is this:

i have 10 buttons, and there’s a bar , that when i click any button, is resized on his x axis, so the text can fit into the fill, for example i click contact, and the bar is too big, and it resizes itself so contact fits with it, but after it, i click administration, so the bar needs to be bigger, so, it resizes itself again to fit administration, .

so, i got an idea, load the xsize before the resize, and then add or substract the quantity needed, but i dont know how

:*(

trigerVariable is whatever variable you want to triger(start) the grow effect.

the scale is in % (you don´t tipe % in the AS code), but I think you can use width too.

=)

still dont get it, could you please post a fla :*(

that fla has a modified code than the first post:

[SIZE=1]hope you are using flash mx[/SIZE]

=)

i made the effect !!!

does it looks good???

http://www.eberthdesigns.com/Reborn/

click on the ball and then english or spanish :wink:

:slight_smile:

but, it is not the same effect, is it?

=)

basically, that was what i wanted <:}

Nice looking site, Eberth :slight_smile:

thanks pom, as you could see, the site is up again, so if you want your account again please pmsg me :wink: