Slider problems

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

:crazy:

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

can you tell me why you have a -0 and a /1? :eye:

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

where:q:

here:

http://www.kirupa.com/developer/flash5/slidingmenu.asp

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

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

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

[SIZE=1]yours code[/SIZE]

_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:

_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 :-\