# Smooth Resize

**URL:** <https://forum.kirupa.com/t/smooth-resize/9909>\
**Category:** flash\
**Created:** [December 20, 2002, 5:38pm UTC](https://forum.kirupa.com/t/smooth-resize/9909 "2002-12-20T17:38:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eberth](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/eberth/32/41_2.png) [@Eberth](https://forum.kirupa.com/u/Eberth)\
**Post date:** [December 20, 2002, 5:38pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/1 "2002-12-20T17:38:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 5:50pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/2 "2002-12-20T17:50:11Z")

</div>

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

```auto
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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 5:57pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/3 "2002-12-20T17:57:43Z")

</div>

☹ 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 % ??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 6:14pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/4 "2002-12-20T18:14:38Z")

</div>

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

:\*(

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 6:18pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/5 "2002-12-20T18:18:35Z")

</div>

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.

=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 6:40pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/6 "2002-12-20T18:40:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 6:43pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/7 "2002-12-20T18:43:11Z")

</div>

that fla has a modified code than the first post:

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

=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 20, 2002, 8:26pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/8 "2002-12-20T20:26:11Z")

</div>

i made the effect !!!

does it looks good???

[http://www.eberthdesigns.com/Reborn/](http://www.eberthdesigns.com/Reborn/)

click on the ball and then english or spanish 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2002, 12:28pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/9 "2002-12-23T12:28:22Z")

</div>

🙂

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

=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2002, 4:15pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/10 "2002-12-23T16:15:07Z")

</div>

basically, that was what i wanted \<:}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2002, 4:50pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/11 "2002-12-23T16:50:07Z")

</div>

Nice looking site, Eberth 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2002, 4:51pm UTC](https://forum.kirupa.com/t/smooth-resize/9909/12 "2002-12-23T16:51:09Z")

</div>

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