# \*backwards\*!

**URL:** <https://forum.kirupa.com/t/backwards/8141>\
**Category:** flash\
**Created:** [November 14, 2002, 7:39pm UTC](https://forum.kirupa.com/t/backwards/8141 "2002-11-14T19:39:15Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [November 14, 2002, 7:39pm UTC](https://forum.kirupa.com/t/backwards/8141/1 "2002-11-14T19:39:15Z")

</div>

alright, here’s what i want to do. hopefully someone can help me figure this out.

i have this code, generously taught to me by lostinbeta

```auto

onClipEvent (load) {
	_x = 0;
	_y = 0;
	speed = 1;
}
onClipEvent (enterFrame) {
	endX = _root._xmouse;
	endY = _root._ymouse;
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;
}

```

and i would like it to do exactly the opposite of what it’s doing.

currently it is set to follow the mouse without using startDrag()  
and i would like to apply this to a panoramic view that has several pictures sliding past one another … a lot like lostinbeta’s footer. but rather than sliding to the \_ymouse i would like it to go to the opposite of the \_ymouse so that it appears more realistic.

any help is appreciated =)

---

<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:** [November 15, 2002, 1:08am UTC](https://forum.kirupa.com/t/backwards/8141/2 "2002-11-15T01:08:34Z")

</div>

Hey shuga,

set a new mc in the center of u movie, call the instance name “topCorner”, put the code given in ur \_root timeline, and define which instance should oppose the mouse movement! :

```php
_root.onMouseMove = function() {
	theBall._x = Math.abs(topCorner._xmouse);
	theBall._y = Math.abs(topCorner._ymouse);
};

```

Hope this helps,

yours,  
h88

NOTE: topCorner should be an empty MC

---

<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:** [November 15, 2002, 5:06pm UTC](https://forum.kirupa.com/t/backwards/8141/3 "2002-11-15T17:06:39Z")

</div>

didn’t work ☹

atleast not for me

on the main stage, layer 1, frame 1 I have two symbol instances  
“ball” and “topCorner” … ball is just a ball and topCorner is an empty mc. there is no code on the instance of topCorner, the code i posted is on ball and the code you posted is on frame 1 of the timeline.

ball still follows the mouse, more choppy (probably b/c there’s more code it’s going through each time, but it still just follows the mouse 🙂

did i do something wrong?

---

<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:** [November 15, 2002, 5:11pm UTC](https://forum.kirupa.com/t/backwards/8141/4 "2002-11-15T17:11:28Z")

</div>

i tried to figure out what you were doing with the code, and it dawned on me that they oppose each other in their commands for ball. so i took the code off of ball which, i’m sure i should’ve done in the first place and it works. well sorta. i’m going to play with it to see if i can get it to work more smoothly. and i don’t quite understand why it works. thank you for your help =)

---

<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:** [November 19, 2002, 10:13am UTC](https://forum.kirupa.com/t/backwards/8141/5 "2002-11-19T10:13:44Z")

</div>

Hmm, okay, another solution which will work smoothly:

```php
MC.onMouseMove = function() {
	this._x = 550-_root._xmouse;//define wide of ur movie other than 550
	this._y = 400-_root._ymouse;//define height of ur movie other than 400
};

```

Tell me how it goes!

---

<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:** [November 19, 2002, 8:22pm UTC](https://forum.kirupa.com/t/backwards/8141/6 "2002-11-19T20:22:14Z")

</div>

it works wonderfully … thank you so much.

thats really weird b/c i tried some similar code and it didn’t work. i guess you just did it the perfect way =)

thanks again, i appreciate 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:** [November 19, 2002, 8:23pm UTC](https://forum.kirupa.com/t/backwards/8141/7 "2002-11-19T20:23:30Z")

</div>

No problem! 🙂

---

<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:** [November 19, 2002, 8:38pm UTC](https://forum.kirupa.com/t/backwards/8141/8 "2002-11-19T20:38:49Z")

</div>

Can i have a look at what your trying to achieve using the code given?

---

<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:** [November 19, 2002, 10:20pm UTC](https://forum.kirupa.com/t/backwards/8141/9 "2002-11-19T22:20:19Z")

</div>

sure thing

i actually didn’t use the code you gave me in the fla b/c it has to be put on the frame and i have multiple instances of the symbol so i would like to have the code on the symbol, although i’m sure i could make either way work. i used lostinbeta’s code b/c it has the easing in it and i took the two codes and combined them.

here’s the original code

```auto

onClipEvent (load) {
	Mouse.hide();
	_x = 0;
	_y = 0;
	speed = 1;
}
onClipEvent (enterFrame) {
	endX = _root._xmouse;
	endY = _root._ymouse;
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;
}

```

and here’s the code i came up with

```auto

onClipEvent (load) {
	Mouse.hide();
	_x = 0;
	_y = 0;
	speed = 1;
}
onClipEvent (enterFrame) {
	endX = 550-_root._xmouse;
	endY = 400-_root._ymouse;
	_x += (endX-_x)/speed;
	_y += (endY-_y)/speed;
}

```

a really simple change and i really should’ve seen it before but i guess it took looking at it from another coding technique’s point of view for me to see what i should be doing. thank you again so much for helping me with that. i appreciate it.

i’ve attached the fla file so you can see what i’m doing. at the moment it’s just experimental so the imagery is just balls. i will refine it and put real images in there soon and i’ll submit my final product here.

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:** [November 19, 2002, 10:27pm UTC](https://forum.kirupa.com/t/backwards/8141/10 "2002-11-19T22:27:54Z")

</div>

Hey, cool one, but i really get confused when i c a hidden mouse, with some easing objects.

---

<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:** [November 19, 2002, 10:35pm UTC](https://forum.kirupa.com/t/backwards/8141/11 "2002-11-19T22:35:43Z")

</div>

yeah … that was merely for experimentation

here is closer to the effect i’m trying to achieve. still without the images but imagine each of the balls as a layer of the scene (like lostinbeta’s footer)

=)

---

<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:** [November 19, 2002, 10:38pm UTC](https://forum.kirupa.com/t/backwards/8141/12 "2002-11-19T22:38:19Z")

</div>

Thats really cool though, needs more, try improving by adding some pictures.

Good Luck!

---

<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:** [November 19, 2002, 10:41pm UTC](https://forum.kirupa.com/t/backwards/8141/13 "2002-11-19T22:41:45Z")

</div>

lol =) i said the pictures aren’t in there yet. i’m still deciding exactly what i want the scenery to be now that i have the coding down. 😛

---

<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:** [November 19, 2002, 10:42pm UTC](https://forum.kirupa.com/t/backwards/8141/14 "2002-11-19T22:42:58Z")

</div>

Try updating in this thread and tell us what did u achieve.

---

<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:** [November 19, 2002, 10:43pm UTC](https://forum.kirupa.com/t/backwards/8141/15 "2002-11-19T22:43:47Z")

</div>

will do =)

---

<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:** [November 20, 2002, 12:04am UTC](https://forum.kirupa.com/t/backwards/8141/16 "2002-11-20T00:04:21Z")

</div>

Everybody likes Lost’s footer. Hehe, even me… Have you seen Dan’s footer?

---

<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:** [November 20, 2002, 12:37am UTC](https://forum.kirupa.com/t/backwards/8141/17 "2002-11-20T00:37:41Z")

</div>

nice!

---

<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:** [November 20, 2002, 1:17am UTC](https://forum.kirupa.com/t/backwards/8141/18 "2002-11-20T01:17:19Z")

</div>

first version is up now … i know the imagery isn’t all that much but i will work on it more later, i just put this together in a few minutes before class.

---

<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:** [November 20, 2002, 5:47pm UTC](https://forum.kirupa.com/t/backwards/8141/19 "2002-11-20T17:47:24Z")

</div>

Your footer is good, first fo all, i think you should change your avatar, lol, or even with no avatar, and, the text “shuga”, try changing the font.
