View Full Version : (FMX) Scaling a MC
jpardee
February 24th, 2003, 02:08 PM
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:
onClipEvent (load) {
_xscale = 0;
_yscale = 0;
}
onClipEvent (enterFrame) {
_xscale += 100;
_yscale += 100;
}
Obviously this is wrong, my clip just keeps on scaling by 100% :) Any help would be great!
Thanks!!
-Justin
pom
February 24th, 2003, 04:07 PM
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:
jpardee
February 24th, 2003, 04:17 PM
Great thanks... and I'll go look for the AS Tricks right now!!
-Justin
jpardee
February 24th, 2003, 11:41 PM
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
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.