Skip navigation
Currently Being Moderated

AS3 Custom Scrollable Movieclip Using Buttons

Apr 3, 2009 9:05 AM


I am a student that is new to AS3 (although I have some experience with AS2) and new to the Adobe forums.

I found, what I think is, a great tutorial on how to create a custom scroll bar without using the UI components. Unfortunately, the author has deleted the video but still provides the source files which I have began to pick apart. Although this scroll bar works great, I am working on a movieclip of scrollable thumbnails that only uses buttons to scroll and not the scrollbar it self. Please correct me if I am wrong, but it seems as though the buttons control the movie clip based on the position of the scroll bar/scroller.

Here is the url of the tutorial page (the source files can be downloaded):
I have also attached the code that is used to control the scrollbar.

Can someone please provide the code that would only use the buttons to smoothly control the timeline? Or show some altercations of the code that would make this work properly. I've seen it done in AS2 without much of a problem but I am not very good at translating AS2 to AS3.
  • kglad
    72,213 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 5, 2009 1:39 PM   in reply to DanEdmonds

    i didn't check any of your links but to scroll a movieclip smoothly, you would do better to control the movieclip's x (or y) property, and not its timeline.

    Mark as:
  • Currently Being Moderated
    Apr 6, 2009 12:03 AM   in reply to DanEdmonds

    You can use a ScrollPane component and customize its look and feel.

    Why you are trying to re-invent the wheel?

    Use ScrollPane component and just customize its look and feel.


    What I would have done in this case is

    1. Take a ScrollPane.

    2. Set its horizontalScrollPolicy ="Off"; and verticalScrollPolicy ="Off".

    3.Change the Look and feel for background.

    4. Create buttons on stage and write the following code on click event of those buttons.




    function moveRight(evnt:MouseEvent)


         myScrollPane.horizontalScrollPosition = myScrollPane.horizontalScrollPosition + myScrollPane.width;

         //You can use a Tween effect here for better User Experience.


    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)