# Voetsjoeba, help with golden formula...?

**URL:** <https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403>\
**Category:** Uncategorized\
**Created:** [August 9, 2004, 4:45pm UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403 "2004-08-09T16:45:02Z")\
**Posts on this page:** 5\
**Page:** 2

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 24, 2006, 7:41am UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403/21 "2006-04-24T07:41:23Z")

</div>

Try

```auto
MovieClip.prototype.easeIn = function(x, y) {
	this.onEnterFrame = function() {
		this._x = x-(x-this._x)/1.2;
		this._y = y-(y-this._y)/1.2;
		this._rotation += 5;
		if (Math.abs(this._x-x)<1 && Math.abs(this._y-y)<1) {
			this._x = x;
			this._y = y;
			this._yscale = 50-(50-this._yscale)/1.2;
			if (Math.abs(this._yscale-50)<1) {
				this._yscale = 50;
				delete this.onEnterFrame;
			}
		}
	};
};

```

scotty(-:

---

<div class="post-metadata">

**Author:** ![jdesign](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jdesign](https://forum.kirupa.com/u/jdesign)\
**Post date:** [April 24, 2006, 2:15pm UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403/22 "2006-04-24T14:15:59Z")

</div>

wow thanks scotty, that was quick reply.  
however this is what happen , it rotate, and stop rotating… and it doesn’t scale down the Y value.

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [April 24, 2006, 2:21pm UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403/23 "2006-04-24T14:21:25Z")

</div>

It did scale here, sure you copied and pasted?  
If you don’t want the rotation to stop, skip the delete this.onEnterFrame

scotty(-:

---

<div class="post-metadata">

**Author:** ![jdesign](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jdesign](https://forum.kirupa.com/u/jdesign)\
**Post date:** [April 24, 2006, 2:22pm UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403/24 "2006-04-24T14:22:33Z")

</div>

well i try to modify the AS  
to:

MovieClip.prototype.easeIn = function(x, y) {  
this.onEnterFrame = function() {  
this.\_x = x-(x-this.\_x)/1.1;  
this.\_y = y-(y-this.\_y)/1.1;  
if (this.\_x\>x-1 && this.\_x\<x+1 && this.\_y\>y-1 && this.\_y\<y+1) {  
this.\_x = x;  
this.\_y = y;  
}  
//startin yscale  
\_yscale += (50-\_yscale)/10;  
this.\_rotation += 3;  
};  
};

And it’s all working fine [COLOR=DarkOrange]But [COLOR=Black]it is scalling all the things in the stage instead of just the targeted MC

Please see swf…

What [COLOR=Red]value [/COLOR]should i change in the [COLOR=Red]AS [/COLOR]so it only scale the [COLOR=Red]Movieclip[/COLOR] instead of the whole stage ?

anyway i’m trying to imitate of what’s going on at [www.naaf.no/pollen/](http://www.naaf.no/pollen/)

[/COLOR][/COLOR]

---

<div class="post-metadata">

**Author:** ![jdesign](https://avatars.discourse-cdn.com/v4/letter/j/47e85d/32.png) [@jdesign](https://forum.kirupa.com/u/jdesign)\
**Post date:** [April 24, 2006, 2:26pm UTC](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403/25 "2006-04-24T14:26:56Z")

</div>

Hi Scotty…  
yes, i’ve copy and paste the AS correctly

or probably i’m doing the other part wrong??  
this is how I use the prototype.

var freeze= true;  
\_root.north.onRelease = function() {  
if (freeze) {  
north.easeIn(70, 90);  
north1.easeIn(71, 95);  
freeze = false;  
} else {  
freeze = true;  
north.easeOut(100, 90);  
north1.easeOut(101, 92);  
}  
};

[Previous page](https://forum.kirupa.com/t/voetsjoeba-help-with-golden-formula/60403.md?page=1)
