Sliding navigation

I was wondering how to make a sliding navigation just by clicking on arrows on either side of the menu. I have attached a picture of what I am talking about.

just by mousing over or clicking either of the arrows the images would slide the corisponding way. I would like it if it all moved smoothly if possible - not chunky.

Any ideas? Thanks guys :slight_smile:

Doesn’t somthing like:
[AS]
on (press) {
this.onEnterFrame = function() {
_root.slider._x+=20
if (_root.slider._x >sliders_size) {
_root.slider._x = 0
}
}
}
on (release) {
delete this.onEnterFrame
}
[/AS]

Where the registration point is on the left. It is similiar to the sliding menu tut in a way. Does it work?

That’s not exactly what I am looking for - but thank you very much for trying to help. I may not have been as clear as I should have. I’m sorry about that.

The code you gave me makes the animation jump and you can only click the button once.

I am looking for something similar to this tutorial

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

but I dont want to have 4 different buttons, just two arrows, one on either side. I like how smooth this one is and the transitions are amazing.

Could someone please help me with this?

Doesn’t mine move smoothLY? i thought it should since i am constantly adding 20 to the x value until i release the mouse. Or am i missing something?? :-\

umm - it might not be you, maybe it’s me :slight_smile:

When I click on it, it just goes once, and thats it. no matter how long I hold down the button. Plus it only works once. If I click the button again - it will not move any more.

are you sure? can i see the fla please :slight_smile:

you sure can :slight_smile:

thanks for the help as well!

Here :slight_smile: you should know what to do with the right button. This is for the left :slight_smile:

wow man that’s fantastic :slight_smile: Thanks for your help. I have yet to try and make the last button, but I dont think there will be much of a problem.

I do have a question for you though - I hope I’m not being a pain here, but I was wondering if you could explain to me what each of the functions do that you made. Kind of break the new code down to me line by line. Thanks very much!:):slight_smile:

Sure :slight_smile:


this.onEnterFrame = function() {


That line, just makes it so it keeps on adding 20 onto the _x value…

And this:


if (_root.slider._x >sliders_size) {
_root.slider._x = 0
}


I remmeber i changed this code, but i can’t remmeber what i changed it to. Refer back to the code that works, but this basically makes the slider repeat itself so you can pres the button forever with the thing sliding forever…

Lastly:


delete this.onEnterFrame


This is pretty self explanatory, but it basically deletes/stops the "this.onEnterFrame’ function, so it stops adding 20 to the slider. Get it? good :slight_smile: