View Full Version : Resize Movie Clip onRelease
PaulD
October 8th, 2003, 10:25 PM
Hello everyone
I am trying to create a script that resizes my Movie Clip in a smooth motion.
Does anyone know of any tutorials that may help me achieve this?
norie
October 9th, 2003, 01:28 AM
on(release){
if(_xscale <= 200){
_xscale +=5;
_yscale +=5;
}
}
PaulD
October 9th, 2003, 04:09 AM
@ norie
thanks, I really need to get myself a good Flash MX reference book so I don't make myself look like such a fool in the forums
thank you so much for the script
norie
October 9th, 2003, 04:11 AM
that wasn't a bad question... compared to some... OMFG!
Voetsjoeba
October 9th, 2003, 01:37 PM
Are you using Flash MX or above ? If so, try this:
MovieClip.prototype.easeSize = function(targetW,targetH){
this.onEnterFrame = function(){
if(this._height>=targetH-1 && this._height<=targetH+1){
delete this.onEnterFrame
} else {
this._height = targetH-(targetH-this._height)/1.2;
this._width = targetW-(targetW-this._width)/1.2;
}
}
}
yourmc.onRelease = function(){
this.easeSize(350,350);
}
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.