Skip to main content
Participant
June 15, 2009
Answered

Command for Max y on scrolling MC?

  • June 15, 2009
  • 1 reply
  • 394 views

Hi guys,

So I have a movieclip that scrolls via a 'up' and 'down' button on the right, they work fine, however, they don't recognise the top or bottom of the movieclip and as such continue scrolling indefinitely.

Is there a way to set my max/min scroll height so it doesn't go past y(0) or like y(2000)?

code:

onClipEvent (enterFrame) {
if (scrollDown) {
_root.ScrollPaneMain.GuruQuestions._y = _root.ScrollPaneMain.GuruQuestions._y-2;
}

And the buttons contain the following:

on (rollOver) {
scrollDown = 1;
}
on (rollOut) {
scrollDown = 0;
}

This topic has been closed for replies.
Correct answer Ned Murphy

Add those into your conditionals... if (scrollDown && _root.ScrollPaneMain.GuruQuestions._y > ? ) {  // example only, > <, ??

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
June 15, 2009

Add those into your conditionals... if (scrollDown && _root.ScrollPaneMain.GuruQuestions._y > ? ) {  // example only, > <, ??

Participant
June 15, 2009

Ah, you're a genius.

Thanks for the help!

Ned Murphy
Legend
June 15, 2009

You're welcome