# Photo move x y values?

**URL:** <https://forum.kirupa.com/t/photo-move-x-y-values/36681>\
**Category:** flash\
**Created:** [November 30, 2003, 1:57pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681 "2003-11-30T13:57:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayek](https://avatars.discourse-cdn.com/v4/letter/b/e99b99/32.png) [@bayek](https://forum.kirupa.com/u/bayek)\
**Post date:** [November 30, 2003, 1:57pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681/1 "2003-11-30T13:57:06Z")

</div>

Hi,

I would like to make the backround picture move slightly with X Y values on mouse over - simple sample here (please click “preview”) [http://www.flashcomponents.net/component.cfm?nav=2&id=170](http://www.flashcomponents.net/component.cfm?nav=2&id=170)  
I have done the Moving an Object Using X and Y Values tut but do not really know how to change it to my needs.  
Perhaps someone could help me out, please? I am sure a nice piece of code fits in here;)

---

<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:** [July 9, 2004, 4:09pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681/2 "2004-07-09T16:09:35Z")

</div>

so where can I find that code now? I didn’t see your examples because the .fla arn’t there to download anymore. But what I wanted to know is How can I do a easing of the foto.

the code I used to move my foto is:

// starting position of the bg;  
xPos = bg.\_x;  
yPos = bg.\_y;

// stage/canvas size  
canvas\_w = 550;  
canvas\_h = 350;

function moveBg(){  
x\_bg = xPos;  
y\_bg = yPos;

xEnd = \_xmouse_xPos / canvas\_w;  
yEnd = \_ymouse_yPos / canvas\_h;

bg.\_x = xEnd;  
bg.\_y = yEnd;  
}

in the bg mc:

onCliEvent(enterFrame){  
\_root.moveBg();  
}

can anyone tell me how can I do an easing ?

---

<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:** [July 9, 2004, 5:07pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681/3 "2004-07-09T17:07:59Z")

</div>

i’ll add the fla once i find it 🙂

---

<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:** [July 9, 2004, 5:14pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681/4 "2004-07-09T17:14:59Z")

</div>

fla. :hugegrin:

---

<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:** [July 12, 2004, 2:38pm UTC](https://forum.kirupa.com/t/photo-move-x-y-values/36681/5 "2004-07-12T14:38:04Z")

</div>

thankx for the code ][][][][
