# \[Flash 8\] \[AS 2.0\] Ultra-Simple question

**URL:** <https://forum.kirupa.com/t/flash-8-as-2-0-ultra-simple-question/240689>\
**Category:** Uncategorized\
**Created:** [October 5, 2007, 1:08am UTC](https://forum.kirupa.com/t/flash-8-as-2-0-ultra-simple-question/240689 "2007-10-05T01:08:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bluepanda](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@Bluepanda](https://forum.kirupa.com/u/Bluepanda)\
**Post date:** [October 5, 2007, 1:08am UTC](https://forum.kirupa.com/t/flash-8-as-2-0-ultra-simple-question/240689/1 "2007-10-05T01:08:33Z")

</div>

Hello everyone,

I’m using a script I got from one of the Kirupa tutorials on easing.  
My question is, how do I make all of that code react to me pressing the button? Currently the button will envoke the easing, but when the movie loads, the easing happens on its own.

Thanks you! 🙂

MovieClip.prototype.ease = function(to:Number, speed:Number) {  
if (what.\_y != to) {  
var \_this:MovieClip = this;  
var aux:MovieClip = this.createEmptyMovieClip(“aux\_easeX”, 1337);  
var previousPosition:Number = this.\_y;

if (isNaN(speed) || Number(speed) !== speed || speed\<=1) {  
speed = 1.2;  
}

aux.onEnterFrame = function() {  
\_this.\_y = to-(to-\_this.\_y)/speed;  
if (\_this.\_y == previousPosition) {  
\_this.\_y = to;  
this.removeMovieClip();  
}  
previousPosition = \_this.\_y;  
};  
} else {  
// do nothing  
}  
};  
myMovieClip.ease(200, 1.04);  
again.onRelease = function() {  
myMovieClip.\_y = 43;  
myMovieClip.ease(200, 1.04);  
};
