# Slider problems

**URL:** <https://forum.kirupa.com/t/slider-problems/10512>\
**Category:** flash\
**Created:** [January 2, 2003, 3:42pm UTC](https://forum.kirupa.com/t/slider-problems/10512 "2003-01-02T15:42:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gilla](https://avatars.discourse-cdn.com/v4/letter/g/48db29/32.png) [@Gilla](https://forum.kirupa.com/u/Gilla)\
**Post date:** [January 2, 2003, 3:42pm UTC](https://forum.kirupa.com/t/slider-problems/10512/1 "2003-01-02T15:42:47Z")

</div>

I have this code on a sliding image

\_root.xnew = \_root.mask2.\_x+( myButtLink4 -0)\*100/1;

I can make it go to the right but if I try to make it  
go to the left the code doesn’t work.

e.g.

\_root.xnew = \_root.mask2.\_x+( myButtLink4 7.7-0)\*100/1;

what am I doing 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:** [January 2, 2003, 3:49pm UTC](https://forum.kirupa.com/t/slider-problems/10512/2 "2003-01-02T15:49:55Z")

</div>

:crazy:

> \_root.xnew = \_root.mask2.\_x+( myButtLink4 -0)\*100/1;

can you tell me why you have a **-0** and a **/1**? 👁

---

<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 2, 2003, 3:56pm UTC](https://forum.kirupa.com/t/slider-problems/10512/3 "2003-01-02T15:56:17Z")

</div>

I don’t know im not good with actionscript and I got the  
code from Kirupa. What should it be?

---

<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 2, 2003, 4:01pm UTC](https://forum.kirupa.com/t/slider-problems/10512/4 "2003-01-02T16:01:22Z")

</div>

where:q:

---

<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 2, 2003, 4:07pm UTC](https://forum.kirupa.com/t/slider-problems/10512/5 "2003-01-02T16:07:58Z")

</div>

here:

[http://www.kirupa.com/developer/flash5/slidingmenu.asp](http://www.kirupa.com/developer/flash5/slidingmenu.asp)

---

<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 2, 2003, 4:44pm UTC](https://forum.kirupa.com/t/slider-problems/10512/6 "2003-01-02T16:44:17Z")

</div>

I´ve seen the tut and it is not exactly what you have done.

[SIZE=1]kirupa´s code[/SIZE]

```auto
_root.xnew = _root.mask2._x+(4-1)*100/2;

```

[SIZE=1]yours code[/SIZE]

```auto
_root.xnew = _root.mask2._x+( myButtLink4 -0)*100/1;

```

* * *

first: any number, minus zero ( **-0** ) and divided by one ( **/1** ) would be the same. that´s why I´ve asked you why they were there.

second: you got everything upside-down. that line:

```auto
_root.xnew = _root.mask2._x+(4-1)*100/2;

```

means:  
[SIZE=1]new position on x axis **IS EQUAL TO** _mask2_ position on x axis **plus** (4-1) **multiplied by\*\*\*\*100 divided by** 2 [/SIZE]

or:

[SIZE=1]new position on x axis **IS EQUAL TO** _mask2_ position on x axis **plus** 150;[/SIZE]

so, it is a number. what you have to do is to find the nuber (VALUE) of the position on the X axis that you want to place your object and use it there. Perhaps if you post your fla here I can be of better help :-\
