(FMX) Scaling a MC

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% :slight_smile: Any help would be great!
Thanks!!
-Justin


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:

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

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.


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