PDA

View Full Version : Left and right scroll to and stop with buttons?


loosecanon
02-10-2008, 10:24 PM
I'm pretty new to actionscript and have a problem:

I'm putting together a Web site and in the body I have filmStrip_mc movie clip that I want to scroll (left or right) to a specific point on an onRelease event.

For example; when the 'contact us' button is clicked, the filmStrip_mc movie clip scrolls past 'products', and 'about us', and stops at 'contact'.

I also, of course, want the movie clip to scroll to any previous page selected.

Any help would be GREATLY appreciated.

Thanks

atomic
02-11-2008, 02:00 AM
A barney's type navigation...

Among others...

http://www.flashkit.com/movies/Third_Party/Swish/_Barn-Azamelay-6645/index.php

http://www.flashkit.com/movies/Scripting/Scrolling/Barney_S-Sasha_Gu-2628/index.php

http://www.flashkit.com/movies/Interfaces/Menus/Barneys-Biotech_-2077/index.php

http://www.flashkit.com/movies/Interfaces/Menus/Barney_M-Navneet_-1944/index.php

loosecanon
02-11-2008, 06:15 PM
Yes, that is exactly what I'm looking for. The first file I cannot open (.swi = Flash CS3 file?) Unfortunately, I cannot make any of the other three work. The second one seems mind-bogglingly simple; use the registration point of the movie clip symbol but, when I try it in my movie clip, it does not work.

Am I missing some code somewhere?

I've attached my .fla file. Can someone tell me where I've gone wrong?

Thanks,

atomic
02-11-2008, 06:26 PM
First off, the maximum width or height of a movie clip is +/-2880 pixels, and thus your filmStrip_mc's width is way over that...

Next, you need a moving script on the filmStrip_mc, which is missing...
Buttons set the targeted x coordinates, but some script has to move the mc...

loosecanon
02-11-2008, 11:20 PM
Hmm...
...that's unfortunate, but explains alot.
Now I need to figure out a way to get the same effect with smaller clip.
As for the moving script that's kinda' what I meant when I asked if I was missing something.
In the Barney Scroll example I mentioned (the second link you posted), the only code in the actions frames is:
targetx = 150;
May be a bit over my head here...

loosecanon
02-11-2008, 11:35 PM
OK, how about this:
I originally tried doing this animation with tweens (see attached) and the whole mc loops. The problem I see is that stop actions at the end of each label will kill the desired effect.

I'm so bad at this, I don't even know how to code the btnProducts_mc to goToAndPlay ("products");

ASWC
02-12-2008, 12:08 AM
Here:

atomic
02-12-2008, 12:27 AM
This is closer to what I had in mind... Tweens are a bit outdated for this kind of scrolling...

In this case all the code is on the sliding pages mc itself...

loosecanon
02-13-2008, 05:45 AM
Well, you certainly rid me of my hardship!

Very much appreciated!

loosecanon
02-13-2008, 05:46 AM
You guys are awsome!

Thanks!

atomic
02-13-2008, 05:57 AM
Grrrrrrrrrrreat! ;)