# Image Jiggle

**URL:** <https://forum.kirupa.com/t/image-jiggle/38419>\
**Category:** flash\
**Created:** [December 22, 2003, 5:47pm UTC](https://forum.kirupa.com/t/image-jiggle/38419 "2003-12-22T17:47:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kovax](https://avatars.discourse-cdn.com/v4/letter/k/7ab992/32.png) [@Kovax](https://forum.kirupa.com/u/Kovax)\
**Post date:** [December 22, 2003, 5:47pm UTC](https://forum.kirupa.com/t/image-jiggle/38419/1 "2003-12-22T17:47:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 22, 2003, 6:40pm UTC](https://forum.kirupa.com/t/image-jiggle/38419/2 "2003-12-22T18:40:16Z")

</div>

```auto
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 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 22, 2003, 7:59pm UTC](https://forum.kirupa.com/t/image-jiggle/38419/3 "2003-12-22T19:59:02Z")

</div>

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??

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 22, 2003, 8:08pm UTC](https://forum.kirupa.com/t/image-jiggle/38419/4 "2003-12-22T20:08:26Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2003, 3:51am UTC](https://forum.kirupa.com/t/image-jiggle/38419/5 "2003-12-23T03:51:09Z")

</div>

:q:

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 23, 2003, 4:05am UTC](https://forum.kirupa.com/t/image-jiggle/38419/6 "2003-12-23T04:05:48Z")

</div>

[http://www.macromedia.com/support/flash/ts/documents/bitmaps\_shift.htm](http://www.macromedia.com/support/flash/ts/documents/bitmaps_shift.htm)
