A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Scroll buttons without the scroll bar?

  1. #1
    Junior Member
    Join Date
    Oct 2007
    Posts
    19

    Scroll buttons without the scroll bar?

    Hey guys, bit of a weird one.

    I have set up a small application which has a movieClip (named "GuruQuestions") with a mask over it, a scrollbar which you can grab and drag and currently, it does precisely what I want it to do.

    However, my boss has decided he no longer wants a 'click and drag' scrollbar, and would instead like just 2 buttons to scroll, so essentially, when the user hovers over the button, it scrolls.

    I have found several threads about using this method with dynamic text, but none for using a movieClip.

    Anyone know of any?

    Thanks in advance.

  2. #2
    Junior Member
    Join Date
    Oct 2007
    Posts
    19
    Ok, so I've worked it out, now I have another issue, in that it scrolls up and down fine but it exceeds the height of the movieclip and just keeps scrolling, and if you are scrolling up it goes past the original movie clips position.

    This is the code I used:

    On the main time line,

    PHP Code:
    onClipEvent (enterFrame) {
    if (
    scrollDown) {
    _root.ScrollPaneMain.GuruQuestions._y _root.ScrollPaneMain.GuruQuestions._y-2;

    On the button,

    PHP Code:
    on (rollOver) {
    scrollDown 1;
    }
    on (rollOut) {
    scrollDown 0;

    Anyone know how to set the maximum and minimum scroll boundaries?

  3. #3
    Junior Member
    Join Date
    Oct 2007
    Posts
    19
    Bump.

  4. #4
    Member
    Join Date
    Jan 2005
    Location
    Earth
    Posts
    81
    Hey, I've got a sample project that I'll be glad to post. I'd post the code but it's a little more than just one piece of code, but it's simple and it's what you're looking for. But what version are you working in so I can save it out properly?

    EDIT: I've posted the sample swf here: http://www.visualexllc.com/Practice/scrollingTute.html
    Last edited by Skarab; 06-16-2009 at 11:27 AM.

  5. #5
    Junior Member
    Join Date
    Oct 2007
    Posts
    19
    Hi Skarab,

    Thanks for the reply, I actually figured it out by replacing the;

    PHP Code:
    onClipEvent (enterFrame) {
    if (
    scrollDown) {
    _root.ScrollPaneMain.GuruQuestions._y _root.ScrollPaneMain.GuruQuestions._y-2;

    with;

    PHP Code:
    onClipEvent (enterFrame) {
    if (
    scrollDown) {
    this.GuruQuestions._y this.GuruQuestions._y-2;
    if (
    this.GuruQuestions._y<=-2700) {
            
    this.GuruQuestions._y = -2700;
        }

    On the up button I just replaced the 2700's with 0's and it performed exactly as I wanted.

    Your help is very appreciated though.

  6. #6
    Junior Member
    Join Date
    Jun 2009
    Posts
    1

    scroll text

    Quote Originally Posted by Skarab View Post
    Hey, I've got a sample project that I'll be glad to post. I'd post the code but it's a little more than just one piece of code, but it's simple and it's what you're looking for. But what version are you working in so I can save it out properly?

    EDIT: I've posted the sample swf here: http://www.visualexllc.com/Practice/scrollingTute.html
    Hi Skarab!

    I am looking for something similar for my flash site. I am stuck up since the buttons are not stopping when the text ends. I would be very grateful if you could post me the code for the above link. I am working on flash cs3; action script 2.
    Thanks a tons!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center