How would you make a diagonal slider?

How would you script the movement limitations to create a diagonal slider? Im not looking for anything tricky. Just a plain 45 degree, .785 rads, um i think :wink: angle movement.\r\r\rMy current Horizontal slider is as follows.\r\ronClipEvent (load) {\r&nbsp &nbsp &nbsp &nbsp min=50;\r&nbsp &nbsp &nbsp &nbsp max=400;\r&nbsp &nbsp &nbsp &nbsp percent = Math.floor((_x-min)/(max-min)*100);\r}\r\ronClipEvent (mouseMove) {\r&nbsp &nbsp &nbsp &nbsp if (drag==1){\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _x=_root._xmouse+offsetX;\r&nbsp &nbsp &nbsp &nbsp if (_x>400){\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _x=400;\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp if (_x<50){\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp _x=50;\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp percent = Math.floor((_x-min)/(max-min)*100) ;\r&nbsp &nbsp &nbsp &nbsp updateAfterEvent ()}\r}

change both the X and Y values instead of just the X. And use the same method for making the constraints. Make sure you change the values and an equal rate to get a 45 degree slant.

I had this problem a while back - put everything in itโ€™s own MC and create it straight - either horizontal or diagonal. Drag an instance of the scroller to the main timeline and rotate it. I found this to work most consistently.

that is a great idea!\r\rI canโ€™t believe I never thought of that!\r\r-georgekaplin