Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- onClipEvent (data) {
- var originalXLoc = this._x;
- }
- count = int(this.name);
- if (count<90) {
- if (count>90) {
- var xLoc = 685.4;
- var yLoc = 68.4;
- var xDist = Math.abs(xLoc-this._x);
- var yDist = Math.abs(yLoc-this._y);
- var xRate = xDist/3;
- var yRate = yDist/3;
- if (this._x>xLoc) {
- this._x -= xRate;
- if (this._x<xLoc) {
- this._x = xLoc;
- this._y = yLoc;
- }
- } else {
- this._x += xRate;
- if (this._x>xLoc) {
- this._x = xLoc;
- this._y = yLoc;
- }
- }
- if (this._y>yLoc) {
- this._y -= yRate;
- if (this._y<yLoc) {
- this._y = yLoc;
- this._x = xLoc;
- }
- } else {
- this._y += yRate;
- if (this._y>yLoc) {
- this._y = yLoc;
- this._x = xLoc;
- }
- }
- }
- this.name = ++count;
- }
Add Comment
Please, Sign In to add comment