# Sliders with motion paths going backwards

Hello! Newbie here.

I was hoping this wonderful community could give me some advice. I want a slider to dictate the movement of an object, but each tick on the slider representing a different position along a path. I also want to be able to move the slider backwards and the object move backwards along a slider.

I've tried a few tutorials, such as the one here (with using a slider instead of buttons):

But when you move the slider backwards, the object moves out of the frame.

I attached a picture that hopefully describes what I'm trying to accomplish. Thank you in advance for you help!

###### 9 Replies

this would be easy if you are willing to have the objects disappear here and reappear there. It is a lot more difficult if you want to watch them move.

Hi Walt, thank you for the response. Yes, I would like them to move. I essentially want to do a cell signalling pathway (similar to the one attached) and the slider control the protein moving in the cell and binding with others. I guess I could do it another way (objects disappear and reappear like you mentioned), but I think seeing the movement and interaction would be much more engaging. T

Try this.

Two secrets: The second, third, and fourth paths must be set to Relative start.

The second and fourth paths must be exactly as long as and on the same angle as the first and third. How can yo do that? Lots of trial and error.

Walt - this is WONDERFUL! Thank you so so much!! I've been at this for 3 days, so you could imagine how relieved I am.

I've been trying to wrap my head around how you did this. If the value of the location is equal to the value of the slider, why is movement only activated when the location is one point away from the slider? For example, I understand "the L shape moves on Line Motion Path 6 when the slider variable changes to 1", but I don't understand the "and location = 2" portion. By moving the slider to position 1, doesn't the variable change to 2? How is the information that the variable was at 2 stored? I really appreciate your help in this.

The slider can sense where it is. That is the position it just moved to.  But it cannot sense what direction it is moving. No problem for position 0 or position 2. But when the position is 1, should the object move from 0 to 1, or from 2 to 1?

That is the purpose of the variable. The variable is set only after all the motions have been done, and all the conditions have been checked. Therefore, in essence, it becomes the previous location (I should have named it that.) So the conditions really are: Move on path 1 if the location is 1 and the previous location was 0. Move on path 3 if the location is 1 and the previous location was 2.

That condition is not really needed for positions 0, and 2, but my background in programming doesn't like loose ends, and I think it is harder for other people to have to figure out what the conditions do, and then also figure out why only some of the triggers have them.

That makes everything very clear, thank you!! I have much more to learn. Thank you again!

This forum is a good place to do that. If you have any more questions, just ask.

Hi Christie - Those free e-books are amazing!! Just bookmarked all these great resources. Thank you so much!