PDA

View Full Version : Scrolling movieclips backwards and forwards


MaxFarago
06-04-2005, 06:07 PM
Hi, I'm trying to make a movieclip that is essentially a bunch of pictures lined up next to each other, and only a portion of that movieclip is seen at any given time (via mask). I have arrows on either end that, onRollOver, I want to tell the movieclip to move either forward or backwards.

The problem I am having is that I can imagine there being to solutions to this problem. One is by having in the timeline of the movieclip the motion of the pictures from one end to the other end, and when the mouse rolls over the forward arrow, it tells the movieclip to play. The only problem is that if I want the back arrow to make the clip move the other direction, I would have to play the timeline in reverse, which I don't think is possible.

The other possible way to do this would be to change the _x value of the mc when the mouse is over the arrow. But the onRollOver call only goes once, so that if I made a function and told it to move the mc._x over 5 pixels onRollOver, it would perform that action only once when the mouse rolls over the arrow, but would not continue to scroll the mc.

Any ideas?

Thanks,

Max

milhowsse
06-05-2005, 07:32 AM
personally i would do it using actionscript (manipulating the x value of the MC containing the row of pictures) instead of a timeline animation.

for the timeline animation, you have the arrows manipulate the _currentFrame property (check the AS dictionary)

using AS, the arrows could change the _x value of the picture MC and there is no hassle of controlling animations.

shoot me a PM if you want to chat about it more

SirNapalm
06-24-2005, 09:22 AM
Hi there,

I agree that AS would be the solution to this as milhowsse suggested. Yet in your case 'reversing the timeline' the only thing I know to do that is to use prevFrame();

Cheers and good luck,