I would like to share my simple scroll bar AS2 component which you can use in your old projects
download SimpleScrollBar.zip (17.81 KB)
Simple ScrollBar
12 Responses
Leave a Comment
I would like to share my simple scroll bar AS2 component which you can use in your old projects
download SimpleScrollBar.zip (17.81 KB)
July 9th, 2009 at 2:01 pm
great !
July 22nd, 2009 at 4:53 pm
thanks! big help..
August 14th, 2009 at 5:53 am
hi,
how about horizontal scrollbar? how to implement with this component.
thanks
August 14th, 2009 at 9:03 am
very simple:
var scroll_c = ref.attachMovie(”ScrollBar”,”scroll_mc”,1,{_x:ref.mask_mc._x,_y:ref.mask_mc._y + ref.mask_mc._height});
scroll_c.setHeight(ref.mask_mc._height);
scroll_c.PageSize = ref.mask_mc._width;
scroll_c.McHeight = ref.content_mc._width+40;
scroll_c.Chunks = ref.content_mc._width+40-ref.mask_mc._width;
scroll_c._rotation = -90;
scroll_c._parent.onScroll = function()
{
ref.content_mc._x = ref.mask_mc._x - this.scroll_mc.getScrollPos();
}
scroll_c.init();
scroll_c.onPress = function(){}
August 19th, 2009 at 3:29 am
I found a bug, when you have more than 1 frame, the scroll bar appears on every frame after. Is there a way to not have this happen?
Thanks
August 19th, 2009 at 3:38 am
Nevermind…I used:
removeMovieClip(”scroll_mc”);
January 16th, 2010 at 1:25 pm
Hello and thank you for this script. I’ve spent a lot of time messing with scrollers but I always get tired of how they look, or find they look tired.
Your script is great, however I have multiple frames inside the content_mc, each frame has a dynamic text field which has a different height.
I am looking for a way to re-size the content_mc from each frame inside. I have made little progress, as I have only managed to stretch the content.
Thank you for reading this and I would really appreciate any pointers you might have
Thanks
Max
March 10th, 2010 at 3:03 pm
how about adding some easing when dragging the scroller? how to implement thid functionality?…
Thanks,
March 11th, 2010 at 7:00 pm
What I have to do, if I want to repeat the same scroll in te same swf, but different content, what I have to change, I have benn trying that for weeks,
Please help, tks!!
April 7th, 2010 at 2:23 am
Hi, could you let me know how can I make the scrolling go “faster” when the arrows are clicked, I find it’s too slow and I’m really no expert in code. I’d appreciate your help, thanks!!
April 13th, 2010 at 1:59 pm
hi guys,
sorry for delay, was busy last weeks
Jun, for example you can use TweenLite for that
http://www.greensock.com/tweenlite/
code to implement:
import com.greensock.*;
//…….
scroll_c._parent.onScroll = function()
{
TweenLite.to(ref.content_mc, 1, {_y:ref.mask_mc._y - this.scroll_mc.getScrollPos()});
}
Angela, to put one more instance of scrollbar to stage you will have to add mask for each content and put different names, e.g. mask1_mc, mask2_mc etc.
than when you attach scroll set different names for each scroll
var scroll1_c = ref.attachMovie(”ScrollBar”,”scroll1_mc”,1,{_x:ref.mask1_mc._x+ref.mask1_mc._width-10,_y:ref.mask1_mc._y});
than onScroll event change position of corresponding content holders
scroll1_c._parent.onScroll = function(){ ref.content1_mc._y = ref.mask1_mc._y - this.scroll1_mc.getScrollPos();
}
Laura, you can make scrolling faster by increasing you frame rate (in this case scrolling will be smoother and faster but it will affect CPU) or you can play with PageSize,McHeight and Chunks parameters (but it will make scrolling coarser)
April 13th, 2010 at 2:02 pm
Max, you have to change McHeight and Chunks parameters for each content you are scrolling