# Reversing actrion script?!

**URL:** <https://forum.kirupa.com/t/reversing-actrion-script/12128>\
**Category:** Uncategorized\
**Created:** [January 27, 2003, 11:41am UTC](https://forum.kirupa.com/t/reversing-actrion-script/12128 "2003-01-27T11:41:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadie\_king](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@sadie\_king](https://forum.kirupa.com/u/sadie_king)\
**Post date:** [January 27, 2003, 11:41am UTC](https://forum.kirupa.com/t/reversing-actrion-script/12128/1 "2003-01-27T11:41:26Z")

</div>

i am using the following code to have images scroll across the screen in accordance to where the mouse moves i.e. if the mouse moves left the images move left.

the code was from :

[http://www.kirupa.com/developer/mx/infinite.asp](http://www.kirupa.com/developer/mx/infinite.asp)

and goes like this:

onClipEvent (load) {  
xcenter = 275; 275 = 1/2 movie width  
speed = 1/10;  
}  
onClipEvent (enterFrame){  
var distance=\_root.\_xmouse-xcenter;  
\_x += (distance\*speed);  
if (\_x\>0) \_x=-550; 550 = width of movie  
if (\_x\<-550) \_x=0;  
}

i want to be able to reverse this code so when the mouse goes left the images go right and when the mouse goes right the images go left? any ideas?!

sadie

thanx for any 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:** [January 27, 2003, 12:05pm UTC](https://forum.kirupa.com/t/reversing-actrion-script/12128/2 "2003-01-27T12:05:26Z")

</div>

```auto

onClipEvent (load) {
	xcenter = 275; 275 = 1/2 movie width 
	speed = 1/10;
}
onClipEvent (enterFrame){
	var distance=_root._xmouse-xcenter;
	_x -= (distance*speed);
	if (_x>0) _x=-550; 550 = width of movie
	if (_x<-550) _x=0;
}

```

---

<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:** [January 27, 2003, 2:48pm UTC](https://forum.kirupa.com/t/reversing-actrion-script/12128/3 "2003-01-27T14:48:09Z")

</div>

cheers :beam: :beam:

---

<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:** [January 27, 2003, 3:54pm UTC](https://forum.kirupa.com/t/reversing-actrion-script/12128/4 "2003-01-27T15:54:12Z")

</div>

no problem dude =)
