Flash Horizontal Navigation - Continuous Loop?

Hello all you Flash geniuses!

First, I will let you know that I am not very well versed in Flash. I know the basics, can use Sprites, know about Tweening and can do all the basic stuff (move objects, blend, fade text in/out, etc). However, when it comes to the programming like ActionScript or anything more complex … I’m a total noob. :stuck_out_tongue: I do know PHP programming so I would hope I could catch on to whatever is the best method, but need to be pointed in the right direction.

Here is what I’m doing:

I can set up the basics, where each box is a link to the specific product page and will highlight on rollover. However, when it comes to scrolling sideways using the left/right arrows, I’m not sure how to best set that up. I have searched for navigations and found a tutorial on creating a similar navigation … but it does not loop.

I would like to be able to be able to keep scrolling to the right and loop back to the first once it gets to the end. Thus in the example above, clicking to the right will have Department 56 show up on the right side after the Lladro, etc.

I’ll take any advice or even a link to a tutorial I can learn from. I don’t mind figuring it out, but just need to be pointed in the right direction at least.

Thanks!

Well, the easiest method would be to first get all of your different images into an Array (or better yet, a Vector.<Sprite>).

How you’re building these depends exactly how you would do this. What I would recommend for this is make each one of them a separate symbol, export for ActionScript (and preferably have their base class be flash.display.Sprite, unless you needed it to be a MovieClip for some reason).

Then, in the Actionscript you would do something like:


var sprites:Vector.<Sprite> = new Vector.<Sprite>();
sprites.push(new Sprite1(), new Sprite2(), etc...);

Then, all you would do is put in some code that would loop through these and position each one in the proper spot, linking around as needed.

Do you want them to smoothly slide across, or basically pop into the adjacent position?

I would prefer them to smoothly slide across as each direction is clicked. They’re going for an “elegant” appearance, so a lot of slow and smooth transitions is what they are looking for.

I would turn them into one big long movie clip then scroll the clip along it’s x axis masking it so that the “outside the frame” area is hidden. I don’t know how to get the continues scrolling though. :blush: I found this: http://www.kirupa.com/developer/mx/infinite.htm

Here is another example of what I’m talking about: http://www.actionscript.org/resources/articles/7/1/Easing-Menu-System/Page1.html Not quite the same as yours but you should get the idea. :slight_smile:

ARGH!

I had just typed up a script to help you out, but hit back and it wiped it all out. =( When I get a sec in either today or tomorrow I’ll try and get it back up.

If I forget, send me a PM or email to remind me. Thanks.

Don’t you love when that happens?! :wink: I appreciate the offer to help though!

Off Topic:

Sorry - I have someone on top of that issue.