Image Jiggle

Hi all,

I am easing a bitmap from one location to another using this function:

function easeX(endX, speed)
{
this.onEnterFrame = function()
{
this._x += (endX-this._x)/speed;
}
}

However, as the bitmap nears its end location it jiggles back and forth before coming to rest. Any ideas?

Thanks.

function easeX(endX, speed)
{
	this.onEnterFrame = function()
  	{
var dx = endX - this._x;
	  	this._x += dx/speed;
if (Math.abs(dx)<1) {
this._x = endX;
delete this.onEnterFrame;
}
  	}
}

pom :slight_smile:

That is a nice addition, it makes sure its actually ends up where I want it to. But the image still jiggles, I wonder if this is just a bug in Flash??

If you’re messing with bitmaps in Flash, you have to set the apha to 98 or 99%. For some reason, this stops the jiggle. Also, if a bitmap is ever “faded” out, you should alpha it to 1 - 2%, not zero…

:q:

That didn’t work for me either. I tried placing the image into a graphic symbol, and then lowering the alpha.

http://www.macromedia.com/support/flash/ts/documents/bitmaps_shift.htm