# (FMX) Scaling a MC

**URL:** <https://forum.kirupa.com/t/fmx-scaling-a-mc/14294>\
**Category:** flash\
**Created:** [February 24, 2003, 7:08pm UTC](https://forum.kirupa.com/t/fmx-scaling-a-mc/14294 "2003-02-24T19:08:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpardee](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@jpardee](https://forum.kirupa.com/u/jpardee)\
**Post date:** [February 24, 2003, 7:08pm UTC](https://forum.kirupa.com/t/fmx-scaling-a-mc/14294/1 "2003-02-24T19:08:05Z")

</div>

What is the AS needed to scale a movie clip? I want it to be at 0% and then increase to 100%. I’ve searched through the forums and haven’t found what I’m looking for yet - I’m a complete newbie when it comes to AS but here’s what I have:

[COLOR=blue]  
onClipEvent (load) {  
\_xscale = 0;  
\_yscale = 0;  
}  
onClipEvent (enterFrame) {  
\_xscale += 100;  
\_yscale += 100;  
}  
[/COLOR]

Obviously this is wrong, my clip just keeps on scaling by 100% 🙂 Any help would be great!  
Thanks!!  
-Justin

---

<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:** [February 24, 2003, 9:07pm UTC](https://forum.kirupa.com/t/fmx-scaling-a-mc/14294/2 "2003-02-24T21:07:21Z")

</div>

```auto

onClipEvent (load) {
	_xscale = _yscale = 0;
}
onClipEvent (enterFrame) {
	if (_xscale < 100) _xscale = _yscale += 5;
}

```

would be better. But the best way would be with dynamic event handlers (see in the AS tricks section if you don’t know what I’m talking about.

pom :tie:

---

<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:** [February 24, 2003, 9:17pm UTC](https://forum.kirupa.com/t/fmx-scaling-a-mc/14294/3 "2003-02-24T21:17:15Z")

</div>

Great thanks… and I’ll go look for the AS Tricks right now!!  
-Justin

---

<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:** [February 25, 2003, 4:41am UTC](https://forum.kirupa.com/t/fmx-scaling-a-mc/14294/4 "2003-02-25T04:41:52Z")

</div>

That’s perfect!! Also, I’ll definitely covert it to a dynamic event handler, the AS Tricks is such a great resource. I have one more dilema, I’d like for a sound to play when my MC gets to 100%… again… I’m code cluless so here’s what I have.

```php

onClipEvent (load) {
	_xscale = _yscale = 0;
}
onClipEvent (enterFrame) {
	if (_xscale < 100) _xscale = _yscale += 10;
	if (_xscale = 100) boomSound = new Sound(this);
	boomSound.attachSound("boom.mp3");
	boomSound.start();
}

```

That’s obviuosly incorrect as it cause’s the sound to loop and MC to grow incorrectly. Any more of you advice would be appreciated. Thanks!!  
-Justin
