PDA

View Full Version : Moving a movieclip up and down



.soulty
November 17th, 2002, 10:15 AM
Hey everyone , hope you can help me , iam trying to figure out how to make the scroll/list menu in 2advanced's portfolio section, it can be found here http://www.2advanced.com/flashindex.htm

I kinda had a idea on how to make it , by using a mask and movie clip which holds the buttons, and then just use the up and down buttons to move the movie clip up and down, but dnt really know how to really do this.

basically want to know how to move a Movie clip up and down when a up or down button is pressed with restriction to how much i can move it up and down,

or if you know any other way this menu is done plz tell me



Any help will be much appreciated, thanx

.soulty
November 17th, 2002, 10:25 AM
Oh by the way, iam using Flash Mx

eyeinfinitude
November 17th, 2002, 03:11 PM
I'm not exactly sure how 2advanced made their portfolio scroller, but I use something similar to what you thought of. I used a mask and buttons that scroll a movieclip. I've attached a fla file so you can experiment with. It's scrolling text right now, but you can put whatever you want inside the movieclip. I hope it helps. =)

.soulty
November 17th, 2002, 09:07 PM
Thanx mate, thats what i was kinda looking for.

One problem though, when i swap a Mc with the type you have,

(the Mc is holding graphics which represents buttons) so when i swap them the buttons are moving the Movieclip way to fast up and down, any way to slow them down?

thanx again for the fla.

eyeinfinitude
November 17th, 2002, 09:46 PM
Well I'm pretty sure theres an AS for slowing it down, but since the buttons are playing an MC, you could extend the scroll MC timeline and that should slow it down. The fla I put up has a frame rate of 24 so thats why its fast. If your actual movie has a slower frame rate then the scrolling should be slower. I'm still new to actionscripting so I can't come up with any fancy AS here. :-\

.soulty
November 17th, 2002, 09:58 PM
I didnt even think to look there, lol, Got so much work on now, going a bit crazy!. i put down the fps. back to 15 ,

all good,
except is it possible to make the buttons only move the mc a bit, not as a tween , now only when u take your mouse off the button it stops or if it reaches the end, i would like to have it so when u press the buttons once you move it a bit up , i have changed the up button to

on (release) {
upaction.gotoAndPlay("up");
}
on (rollOut) {
upaction.gotoAndStop("stop");
}

.soulty
November 17th, 2002, 10:23 PM
I figured it out, i put a whole row of stop actions on top of the tween, and works fine, much like 2 advanced one ;)

well not really but good enough, ill probably work on it more as soon as i can find some better methods,

thanx alot for your help electrongeek , by the way, Ninjai is killar , been watching that since epsiode 1, number 10 took too long to come out, but yeah awesome animtion in that, and yeah your site is pretty nice.

thanx again.

eyeinfinitude
November 17th, 2002, 10:36 PM
I tweaked the original fla above to do what you wanted. I went in and placed some stop actions inside the scroll MC and I also went into the upactions MC and replaced this line of code:

{_parent.scroll.prevFrame();
}
gotoAndPlay("up");

with this line of code:


{_parent.scroll.prevFrame();
}
gotoAndStop("up");

So that it doesn't scroll all the way back down when you press the button.

I hope that helps. =)

eyeinfinitude
November 17th, 2002, 10:39 PM
Here's the new fla, heh i forgot :P

Yup I can't wait till the next episode of Ninjai comes out.

.soulty
November 17th, 2002, 11:26 PM
Here my fla, Its working ok i guess, still only going one frame back when you press up , but i think thats to do with the scattered stop actions on the tween, tell me what you think, what i can do to fix it, improve it, again all credit goes to electrongeek for the code.

eyeinfinitude
November 17th, 2002, 11:51 PM
Your fla was almost perfect except it didn't scroll down all the way on some of your buttons. I went ahead and fixed it for you. I added some more frames to the upaction movieclip and placed:

_parent.scroll.prevFrame();
into the frames so that it scrolls a little bit more than it does before. It should work exactly how you wanted it to. =)

.soulty
November 17th, 2002, 11:57 PM
Awesome mate , much appreciated, works great now, has the tween both ways, exactly what i wanted.

Thanks for your help

eyeinfinitude
November 17th, 2002, 11:59 PM
Glad to be of service. =)