Apr 20 2010

Free AS3 Scrollbar Class

Category: Free Filesadmin @ 5:10 pm


I did a couple of searches around and I found out that you can’t easily find a free and good looking scrollbar class which supports Horizontal and Vertical scrolling both at the same time! so I decided to build one :)

then it turned out that it actually does even more than just scrolling horizontally and vertically!!! you can control everything also.

Here are the features of this class:

  • supports horizontal and vertical scrollers individually or you can use them both at the same time
  • the main class itself is extending MovieClip and you can simply add it to anywhere you’d like
  • the content to be scrolled, can be anything, text, html text, an image, a video file, sprite, shape, movieclip, whatever!
  • the scroll has a smooth movement and the speed is customizable
  • mouse wheel is supported
  • the scroller design can be easily modified for your own uses
  • live and runtime scroll support (if your content extends in the runtime, the scrollbar will fix itself to the new dimensions automatically)

check the demo here

let’s have a look at how the scrollbar initializes:

1
2
3
4
5
6
7
8
9
10
11
12
// initialize the scrollbar
myScroll =  new MyFlashLabScrollbar( toBeScrolled ) ; // toBeScrolled is  the  movieclip you want to scroll

// set the scrollbar properties
myScroll.w = 215;
myScroll.h = 275;
myScroll.speed = 50;
myScroll.position = MyFlashLabScrollbarPositions.AUTO;
myScroll.showHandCursor = true;

myScroll.finalize( ) ;
this.addChild(myScroll) ; // add the scroll bar anywhere you want.

check our new Scrollbar class here.

Download Now:

Enter your name and email address, the download link will be sent to your email.

We do NOT share your information with any third party. This is promised.





Tags: , , , , , , , ,

50 Responses to “Free AS3 Scrollbar Class”

  1. Mike says:

    Hadi -

    I am still new with AS3 & Flash… learning a bit more & more everyday

    Love your coding, classes, graphic concepts etc.. pure genius!!

    You are by far, my fav flash author at ActiveDen :)

    Hope to see more & more of your stuff soon ( Love the scrollbar class )!

    -happy coding
    Mike

  2. Shahzad Khan says:

    Thanks Hadi, this is a great help.It saved my time.

    How, if i want to use it twice in my application?

    • admin says:

      you may use it as many times as you wish. Just initialize the scrollbar for any object that you want to scroll and that should work.

  3. Shahzad Khan says:

    Thanks for you response Hadi.

    Here is my code for two different movieclips i am using.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    private var myScroll:MyFlashLabScrollbar;
    private var _myScroll:MyFlashLabScrollbar;

    myScroll = new MyFlashLabScrollbar(designWindow.thumbsContainer);
               
                // set the scrollbar properties
                myScroll.w = 287;
                myScroll.h = 290;
                myScroll.speed = 50;
                myScroll.position = MyFlashLabScrollbarPositions.AUTO;
                myScroll.showHandCursor = true;
               
                myScroll.finalize();
                myScroll.x = 10;
                myScroll.y = 75;
                thumbsContainer.addChild(myScroll);
                designWindow.addChild(thumbsContainer);

    _myScroll = new MyFlashLabScrollbar(shapesWindow.clipartContainer);
                _myScroll.w = 287;
                _myScroll.h = 290;
                _myScroll.speed = 50;
                _myScroll.position = MyFlashLabScrollbarPositions.AUTO;
                _myScroll.showHandCursor = true;
               
                _myScroll.finalize();
               
                //myScroll.x = 10;
                _myScroll.y = 75;
                clipartContainer.addChild(_myScroll);
                shapesWindow.addChild(clipartContainer);

    Is this rite?
    Let me know your comments.

    • admin says:

      almost correct. just try not to addChild the content to be scrolled, remove these two lines.

      1
      2
      designWindow.addChild(thumbsContainer);
      shapesWindow.addChild(clipartContainer);
  4. Shahzad Khan says:

    It works for the design window, but not working for the shapes window:(
    For some reasons didn’t show up the scroll bar in shapes window.

    • admin says:

      having a second look at your code I noticed that you are trying to put the thumbsContainer into the scrollbar and from the other side, you are adding the scrollbar itself into thumbsContainer !!! that does not make sense.

      where the scrollbar is added cannot be set as the scrollbar content.

  5. Shahzad Khan says:

    But for thumbsContainer it works perfect.

    check it out here.

    http://shezi.flashiology.com/productdesigner/main.html

    But do now work for clipartContainer.

    Its says the clipartContainer is in the main, while i have added it as shapesWindow.clipartContainer :(

  6. Shahzad Khan says:

    Thanks Hadi.

    I have fixed it:)

  7. Arabesque says:

    Thanks for the great component :D !

  8. polo says:

    gracias

  9. DD says:

    I tried to download it but it won’t let me. I entered the info, pressed the download button, but it doesn’t do anything. No matter how many times I try, it’s always the same.

    Any idea why is this happening?

  10. lukman says:

    horay… i fixed the issue. now i got the download link. and can put comment without error. thanks hadi.

  11. meme says:

    great file

  12. jim Davis says:

    Hey, I entered two email addresses and never got either one.

  13. Touf says:

    Hello,

    I have sent my email adress but I never received a mail from you.
    How can I have your class (Free AS3 Scrollbar Class)

    Thx

  14. igor says:

    Hi,
    Submitted email address for download but did not receive the link. Is it working?
    Thx

  15. Edwin says:

    Hi, I didn’t get your link:(

  16. David Mack says:

    Love your AS3 Scrollbar Class demo.

    I submitted my name and email address several times but never received a link to the download; is it still available?

    Thank you.
    David

  17. David Mack says:

    I never received the link for download; is it still available? Thanks!

  18. Stefan says:

    Hi. I entered my email twice and have not received my download link. Is there something wrong on your system. I need this class soon. Plz?

  19. admin says:

    Hello every body… sorry about the download problem… the damn mail server is killing me! I will try to fix it a.s.a.p

  20. Jerry says:

    I just tried to download your amazing class, but still hasn’t gotten it..

  21. Robson Carvalho says:

    No link for me either :(

  22. ali says:

    our mail server got a problem :( we try to fix it. thanks a lot for your compliments and patience.

  23. Jason says:

    hey i been trying to download this for a week or two now and cant get it to mail me a link.
    can you just email it to me
    i purchased the popup from activeden a week or so ago
    i just need this also thanks if you can email it

  24. admin says:

    Email problem is now solved :) please go with the downloads now.

  25. Norbert says:

    Thanks

  26. jason says:

    thanks it worked

  27. DC says:

    Hi i tried to get the scrollbar class, but all i get is:

    Sorry, no posts matched your criteria.

    What should i do?

  28. Batgra says:

    Anyone able to help me out?
    I believe i set it up correctly, but am getting two errors…

    1046: Type was not found or was not a compile-time constant: myScrollSkin.
    1180: Call to a possibly undefined method myScrollSkin.

    It looks as if myScrollSkin is the culprit, am i missing an imported package?

  29. jahnny says:

    thanks

  30. Andrew_I says:

    Hello! I’m having an issue I cannot solve. I’m getting these errors when I test out the scrollbar:

    C:\…\com\myflashlab\classes\tools\scrollbar\MyFlashLabScrollbar.as, Line 121 1180: Call to a possibly undefined method myScrollSkin.
    C:\…\com\myflashlab\classes\tools\scrollbar\MyFlashLabScrollbar.as, Line 50 1046: Type was not found or was not a compile-time constant: myScrollSkin.

    Which is what Batgra had wrong. I don’t understand what I need to do fix this “yeah… you must copy that from library…”
    Copy what from the library to where?
    Sorry, I’m a beginner.

    • admin says:

      no prob. just go to the library and you’ll find “myScrollSkin” copy that to your own fla library project and then try compiling… :)

  31. Mike says:

    bold not working
    <![CDATA[- Austrian monk Gregor Mendel begins his studies of variation.]]>

  32. Tim says:

    Hi!
    I gotta say, the class works awesomely, especially for an as3 beginner like myself. I do have one little “hic-up” though that i just cant seem to figure out. Im trying to get the scroll box to load at the bottom, rather then at the top (when the content within it is large enough to be scrollable). Can anyone help me out by pointing me in the right direction, on how to get that done?? I have got to imagine it isnt super difficult to do, but all the math and variable names loses me.

    Thanks!!

  33. Tim says:

    By “at the bottom” i mean scrolled to the bottom.

  34. The Game says:

    Hi Hadi,

    I just entered my email and name there to download the scrollbar class but I have not received any email. Can you please help/check? where can I download this cool class? thanks :)

Leave a Reply

*