i am trying to accomplish a sliding navigation in flash where a use clicks a button and a movie frame slides into place in the movie. for example, my movie is 200x300 and the total navigation is 200 x 900. when one of the buttons is pressed, the 200 x 900 sized image slides over so that the part of it that corresponds to the button pressed is visible in the 200 x300 flash movie.
but couldnt not get it to work, which is a shame because it is exactly what i want to have done. ill take whatever help i can get, if someone knows how to do it (mostly the actionscript involved), knows a tutorial that explains it, or just might know how i messed up the tutorial in the link above, let me know, i would be very greatful.
Hey man, i know exactly what your’e talking about.
The easiest way to use an array to make the points where it stops. Put this code on the clip that you want to scroll:
–EDIT–
Crap i just realized you meant a vertical scroll, well i made a few changes but i’m trying it right now to make sure it works, if it doesn’t work i’ll fix it, just warning you
Ok i’m posting an example file i just made really quick. I got it all right except that big chunk of code i posted actually goes on a layer inside of your scrolling movie clip. On here it’s hard to go through a step by step, but hopefully it’ll make sense when you see it. The code is set up in such a way that you can use it for any kind of scolling size or direction you want. All you do is change the numbers in the array to match up with the x and y coordinates you want the destinations to be at. If you have questions once you see it, feel free to ask.
As in… what do you want to make it scroll? Do you mean with keypresses or mouse movements or what? You mean you don’t want buttons going between your sections?
Sorry if I didn’t explain myself very well. What I wanted to do is create a scrolling menu that uses the mouse position.
for example if the mouse pointer is to the right of the movie clip then moves to the right. and the same goes for the left and when the mouse pointer is in the middle then it stops moving.
Also How do you create the alpha-ing out at either end which makes it look pretty cool!
Yeah more or less like that. The only thing I wanted different from that is it will stop at the end/beginning of the buttons. Also I wanted it to alpha out at either end.
Yeah the tutorial that Cello posted a link to is more what you seem to be looking for, Madball. But Ben, if you have any questions about the .fla i posted, since that does seem to be what you were wanting to be able to do, let me know.
Hey Madball, about the infinite menu tutorial you’re looking at, it shouldn’t be hard to get that where you want it. That’s why these things on here are tutorials, they’re concepts that you can experiment with and build on. If you download the .fla of that tutorial, you can find the part in the code that makes it loop. Once you do, get rid of it. You may need to figure out how to make it stop at the correct points at the ends. As far as the alpha-ing out at the ends, create a layer on top of everything and make two gradients at either end. Make one color of the gradient the color of the background (so that it blends in) and then the other color of the gradient the same color, but make its alpha 0%.
The Real Alan - So to create these two gradients would I use the block tool and create four blocks and place two at either end.
Then Should I select two (one at each end) and then change them to the same colour as the background. Then select the other remaining two and change their alpha to 0%
All you need is two blocks, one at each end, with the same gradient in each one, just one’s rotated 180 degrees. To creat a gradient, draw a block (with no outline) and in the Color Mixer panel, next to where you choose the color of your box, click the dropdown box that says ‘solid’. Scroll down to ‘linear’. You’ll see a line with two color buckets appear just below that. The colors you choose for the mixing of your gradient are what goes in these two buckets. Make them both the same color that you want to use, and then select one of the color buckets, and change its alpha number to 0%. After that you can scoot the gradient around in the box and stretch it out till you’re happy with it. You can then duplicate that box, rotate it and use it on the other end. I hope i explained that decently, somehow i feel like i didn’t. But i tried, hope it helps.
Hey no problem, i’m just glad i can help, i’ve spent so long on here SEEKING help (and thanks to all those who’ve helped me) that i’m just glad that now i’m at a point with flash that i can actually help other people.
The Real Alan - Right I just have a quick question. Should I place these blocks on the same layer as the scrolling movie clip or do I create a new layer?
Put it on a layer above so that it covers the stuff that you want it to cover, which is probably everything. So as long as you keep it on top, anything under it will have that fade over it.
That’ll take some actionscripting. Search around on here for controlling alpha with actionscript. I’ve never done that so i can’t tell you exactly how to do it, it would basically consist of a rollover action on your moviclip, where on(rollover){ would cause it’s alpha to go to 100%, and on(rollOut, dragOut) would change the alpha to whatever you wanted it to go transparent to. But you would probably want it to ease into the alpha changes. Search for ‘easing alpha’ or ‘changing alpha’. Sorry i’m not more help on that.