# Tutorial for scaling w/actionscript

**URL:** <https://forum.kirupa.com/t/tutorial-for-scaling-w-actionscript/45302>\
**Category:** Uncategorized\
**Created:** [March 12, 2004, 9:57pm UTC](https://forum.kirupa.com/t/tutorial-for-scaling-w-actionscript/45302 "2004-03-12T21:57:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)\
**Post date:** [March 12, 2004, 9:57pm UTC](https://forum.kirupa.com/t/tutorial-for-scaling-w-actionscript/45302/1 "2004-03-12T21:57:32Z")

</div>

Could someone help me to point to a tutorial? I’d like to have 2 mc’s that scale up or down depending on which one the pointer is over. When th epointer is over mc1 it increases and the mc2 decreases equally. I have tried searching "scaling with actionscript but I don’t find anything remotely close, at least not on the first 140 topics found (or so).  
Would be grateful for help:p:

---

<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:** [March 12, 2004, 10:08pm UTC](https://forum.kirupa.com/t/tutorial-for-scaling-w-actionscript/45302/2 "2004-03-12T22:08:42Z")

</div>

here’s a little rough code:

```auto
onClipEvent (enterFrame) {
percent = this.getBytesLoaded()/this.getBytesTotal()*100;
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
_yscale = percent;
} else {
_yscale = 100-percent;
}
}

```

stick this code on both MCs and it should follow your effect.

---

<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:** [March 13, 2004, 8:11am UTC](https://forum.kirupa.com/t/tutorial-for-scaling-w-actionscript/45302/3 "2004-03-13T08:11:22Z")

</div>

I did a very quick try and I’d have to work with it a bit to make it work but what I am really after and that I am very bad at figuring out myself is that the mc’s actually GRADUALLY get larger and smaller as you move between them. I have tried to work out a calculation for scaling before but it doesn’t work very well.
