Scrollbar Component (Version 2.0.0)
2336 downloads / 17790 views
Rating: 4.19
Author
- Name
- Elvis Mehmedovic
- Site
- http://emehmedovic.com/
- Contact
- mailto:me@emehmedovic.com
Release Date
14 Feb 2008 19:30
Platform
AS 2.0, Flash Player 7/8/9
Description
Scrollbar Component is an XMCA 0.3 based component. Resizability is provided by Align Components 4.0.2. Tile Component 2 is used in JavaRip skin. Panes used are instances of SimplePaneComponent class.
Component itself is a skin, linked to Scrollbar Component class. Components are not compiled clips. Hence, skin modifications can be live previewed after converting to compiled clip (don't forget to disable old preview first).
All provided skins support height and width resizability.
1.0.1: A minute bug fixed; architecture updated to XMCA 0.3 (same version as Menu Component 2.0.0)
1.5.0: ScrollArea Component included: supports (custom) easing, mouse wheel, and movie clip loading.
1.6.0: MaskArea Component included: provides ScrollArea functionality for movie clip instances; additional skin included (Handle); waits for ScrollArea to initialize (however, it is still recommended to keep the scrollbars above the ScrollArea components, for faster initialization); bug fixes.
2.0.0: Smoother and faster easing (now time-based); scrollbar handle is now more responsive; scrollbar handle can now be dragged outside of the browser window, or the Flash object area; ScrollArea and MaskArea now provide keyboard support (keys: up, down, page up, page down, home, and end), and refresh automatically on content change.
Preview and Downloads
Discussion
Lyrek (10 Aug 2005 21:27)
I'm sorry, I'm confused. I downloaded the MXP for Windows and installed it into Flash Extension Manager. When I opened it, I dragged the component to the stage and created a scrollable dynamic text field, named mytext and multiline-ready. I set the target of the vertical scroller to mytext and it seems to work. But i'm not certain how to make it have the "easing" or other parameters that your examples use. There doesn't seem to be options for that.
Also, do I need to install the source somehow? or just the .mxp?
Thanks,
Lyrek
Elvis Mehmedovic (11 Aug 2005 7:07)
Easing is implemented in ScrollArea component. You should wrap your text field in a movie clip, and scroll that movie clip. Easing doesn't work directly with text fields because text scrolling scrolls text lines, which makes easing rather choppy. (However, this is great for extremely large texts, because it won't cause any slowdowns.)
iwanow (23 Aug 2005 18:54)
Hi Elvis,
we have an urgent request concerning your scrollbar component (which definately rocks ;-)). We couln't figure out a way to create an instance of it with import+createClassObject. I bet there's a way to do it and I'm simply missing something ... Any help with it is truly appreciated =-) And keep up doing the good work, thanks a lot for it!
Kind regards,
Iwanow
Elvis Mehmedovic (23 Aug 2005 18:59)
You should use attachMovie() instead.
iwanow (23 Aug 2005 19:19)
wow, thanks for the fast replay! I just tried it, works fine, of course - well, life canbe so easy ...
saves my day ;-)
iwanow
joohn (24 Aug 2005 16:07)
looks nice, ill try it out right now!
thanks for programming it!
yyd (2 Sep 2005 9:56)
good work,
good work (10 Oct 2005 7:50)
thanks aloooooooooooooooooooooot
david (13 Oct 2005 2:06)
is there a way to skin these scrollbars on a per-instance basis? so that different scrollbars can be different colors, widths, etc?
max (20 Oct 2005 16:59)
nice scroll bars - one question... if i am referencing an swf (with the scroll bar on) into another swf, the scroll bar fails to work, is there any way round this?
con (27 Oct 2005 11:14)
hi looks great!
2 questions:
are these free to use?
is there a small tutorial on how to implement these in another .fla?
best regards
con
Jose Tang (27 Oct 2005 22:03)
Excelenteeeeeeeeeeeeee componente....demore en aprender como se usa pero solo felictarlos me ahorraron 500000 problemas jejeje...en serio muchas gracias....
fons (2 Nov 2005 10:21)
hi,
i'm using your scrollbar and scrollarea for the first time and what i like the most is the use off the scrollwheel (and easing) with moviclips.
now i'm wondering if it's posible to dynamicly move to a certain position in the pane (like anchors in html).
in the pane that i was using before (also easing etc but no use off scrollwheel) it could be done by .setScrollPosition(x,y)
is this posible with your pane?
thanks ahead
fons (3 Nov 2005 7:28)
oops, nevermind the previous question, read the textfile en found out myself.
but could it be there's a little bug with the Hscrollbar? when dragging it to he right (end) the scrollbars face disappeares! moving back with the arrow it makes it show again.
sajid saiyed (4 Nov 2005 20:02)
Hi,
First let me say a million thanks for these components.
I had a question about the Scroll area component.
Can I attach this component in my movie dynamically.
i.e
If I create a movieclip by:
_root.creatEmptyMovieClip(); method,
Then I attach some movieclips to this create clip.
Now, Can I attach the scroll area component to scroll this dynamically created movie clip?
I will greately appreciate any help or suggestion .
thanks again
Andrew (30 Nov 2005 13:23)
Excellent components.... I have been working with the MX2004 native scrollbar component and its been giving me lots of grief with HTML in a dynamic fields... I am so happy to say that your have given no problem at all and totally smooth. Once again thanks.
Daniel Evans (20 Dec 2005 14:53)
How do i use this component???
Ive got a piece of text which i need to scroll but i dont know how to link the scrollbar to that piece of txt
Anyone help?
Rich (3 Jan 2006 22:51)
Elvis, I just discovered your components, and I have to say they are exquisit. I am using the ScrollPane/ScrollBar component in the development of my portfolio site. I am developing the site using dynamic Flash fed thru an XML document. I am loading a dynamic list into the ScrollPane component. On the initial load the scroll bar reads the height of the list inside the scrollpane, however when I repopulate the scrollpane dynamically, I have to click on the Scrollbar to jar it into re-reading the scrollpane's new height. Sometimes the ScrollBar will disappear. My question is if ther is any way I can re-fresh the ScrollBar dynamically based on the height of the new list inside the ScrollPane. Is ther a function built into the ScrollBar Component that I can call that re-reads the height of the new content? ----- thanks so much for any help you can give me, Rich
Laban (12 Jan 2006 18:03)
Love this scrollbar component but I have just one little problem.
How do I reach a function inside a movieclip?
When I use scrollpane I use
_parent._parent.scroller.spContentHolder.MyFunc
scroller = the name of the scrollpane
MyFunc = the function inside the movieclip
I have try now in some days and nothing work
pedro (17 Jan 2006 0:48)
how can i update the scrollbar?
I have dynamic text load into a dynamic box.Each time i load different info to that box i want to update the drag position.
Please help me if you can ?
thanks
papi (28 Jan 2006 9:21)
Thx a lot your componements are very usefull.
thx to share it
peace
tj (23 Mar 2006 20:05)
Hi, is there an auto-hide function available for this scroller? The official scroller has this option for when there isn't enough dynamic content to justify the appearance of a scroller.
tj (23 Mar 2006 20:22)
Nevermind, I see I can just set alpha to 0% on the disabled portion of the skin for the same result. Good work on this. Thank you.
Elvis Mehmedovic (25 Mar 2006 22:49)
There is a new version available. Please upgrade.
Paulius (26 Mar 2006 5:45)
Elvis
I just want to say thank you :-)
you the best ..............................................
papi (26 Mar 2006 9:04)
thx a lot man
Peace
christopher (27 Mar 2006 21:05)
Thanx for the Upgrade & for sharing this!!!
Roger Tremblay (20 Apr 2006 4:19)
have a variable as a URL for the scrollarea? I am dynamicly loading clips and would need to have the scrollarea refresh every time a movie needs loading.
Thanks,
Roger
Jordan (20 Apr 2006 17:45)
how do i use the update() ? do i have to target that to the the scrollbar? i cant seem to get it to work
im loading dynmaic text into the scrollbar and i want to the scollbar to go to the top each time i load new text rather then have it stay where it was on the last postition
thanks for the help
Elvis Mehmedovic (20 Apr 2006 20:57)
ScrollArea components does not reset content coordinates on content change (1.6.0). I will address this problem in the next update, but untll than, this should work:
scrollArea.easing = false;
scrollArea.contentX = 0;
scrollArea.contentY = 0;
scrollArea.easing = true;
scrollArea.update();
As for loading content, update() is called automatically when the content is loaded, but if the content size changes (e.g. in the next frame), you should call scrollArea.update().
Jordan (20 Apr 2006 21:36)
doesnt seem to work. what is scrollArea? is that the name id name for the scroll compoment, the dynamic text area, or doesnt matter i just use that?
Any other ideas?
thanks for your help
Elvis Mehmedovic (20 Apr 2006 21:47)
If you are scrolling a text field, simply call scrollBar.update();. It is possible, at the time your text is loaded, that the scrolling properties of the text field do not update instantly, in which case you have to call update a frame later, or something like that. (Note that this is an issue with the text field itself, returning outdated scrolling info.)
Jordan (20 Apr 2006 22:41)
still cant get it working. hmmm. not sure why. scrollBar.update() for scrollBar is component name of the scrollbar right?
Juan ignacio (24 Apr 2006 7:04)
Why does the component stop working if the document is set to export classes in other fame than 1?
is there a fix for you?
Zaid (4 May 2006 14:01)
Hey guys....how to I enable easing on the simple scroll bar?
niklas (10 May 2006 9:40)
Does anyone know how to change the color of this component?
Help would be highly appreciated....
Niklas
Juan (15 May 2006 19:21)
Place the componenet, enter the movies and submovies until you reach a vector/shape, change it's color and that's it.
Does anybody know how to change the frame number where ActionScript is exported and Scrollbar still work?
niklas (18 May 2006 10:26)
Hi!
I'm using the scrollbar component for a site I'm developing... I have an animimation at the top playing all the time. That animation slows down and becomes very choppy when you use the scroll-is there a workaound for this. Am I doing something wrong? Niklas
christopher (22 May 2006 15:55)
Hello,
Again thanx for your components..
But I need some light about the scrollbar..
I want to resize de scrollBar and the scrollArea after resize the stage.. I use a listener and with the stage width i set the the Size.. ( with the _width property ) but the problem it stretch and deform the scrollbar or the content.
Can you help me about this ? Is there a variable to set those properties to do this ? ( like contentWidth or something)
Thanks.
Take Care.
christopher.
Elvis Mehmedovic (22 May 2006 16:01)
Use setSize method to resize the components, e.g.:
scrollbar.setsize(scrollbar.width, 200);
christopher (22 May 2006 16:45)
Thank You !
jer (27 May 2006 1:07)
I cant seem to download
Snkur Arora (31 May 2006 8:09)
any component which can scroll a movie clip whose registration point is center?? I need it urgently...
Thanks in advance
silencio (31 May 2006 12:50)
Hello,
First I would like to thank you for this.
It's simply fantastic !
I have just one small little tiny question.
I try to change the skin of the 'handle' scrollbar component,
for the color and the shape it works very well.
But if I change the height (or the width) of the slider, (bg & bghigh)
visually it works good but the slider overflow
It behave like the slider's size was 50 pixels, but it is not.
Is it possible to change this value.
Anyway thank you very much.
ps : sorry for my english
Elvis Mehmedovic (5 Jun 2006 8:51)
If you are modifiying the Handle skin's height, there a code snippet attached (twice; in two frames) to its hande:
onClipEvent(load) {
minHeight = 50;
maxHeight = 50;
_parent._update();
}
Change the values and it should work.
niklas (5 Jun 2006 15:24)
Awesome component...I really like the look of it but I can't make it work 100%. It seems that it doesn't get updated correctly. I do use the update code but still problems. Somehow I need it to load the content and update after content is finnished downloaded...how would I do that? Can you use onLoadComplete with this component?
Niklas
silencio (7 Jun 2006 11:34)
Thank you Elvis for your help and your response
chespy (6 Jul 2006 12:24)
Exelent components!
how can I make a simple "Top" link at the end of the scroll,
( I'm using scroll components) , but I have no idea how do it.
thanks
zee (31 Jul 2006 14:51)
excellent component!
FlashCurious (1 Aug 2006 17:27)
What a concept! Components that work correctly.
Thank-you VERY much for your great work.
S3V3R0 (6 Aug 2006 23:34)
For sure a silly question, but how can I change the content (symbol on the component inspector) of my scrollbar with actionscript? Post an example please. Thanks in advance and keep up the good work!
Nick Collura (15 Aug 2006 21:45)
Great components! But there is no documentation for them.
what methods are supported? How can i find this info?
I would like to know how to load text dynamically into the scrollArea component.
Right now i have a movieclip in the library that contains a text block. I give it a linkage id and point the scrollArea component to it using the property inspector. But i can't figure out how to load new text at runtime.
ANY DOCUMENTATION would be greatly appreciated. Thanks in advance.
horizens (18 Aug 2006 17:47)
is there an easy way to autohide the scrollbar? the closest i've come is to setting the bg alhpa to 0, but the scrollbar is still enabled.
great component btw. very easy to use.
zee (18 Aug 2006 18:45)
give the scrollbar an instance name, then put this action on the timeline:
//scrollbar instance name is horizens
horizens._visible = false;
horizens (18 Aug 2006 18:57)
unless i'm missing something, that just hides the component. i'm looking for a way to autohide it if there isn't enough text in a textfield but show it if there is.
zee (18 Aug 2006 19:00)
nope, that's the only way to do it. When you put that code in the timeline, it will automatically hide it.
horizens (22 Aug 2006 14:28)
Hi, I'm having a problem getting the handle scrollbar to update. I have one textfield that I'm dynamically loading text into. If I have scrolled down in the text and then use a button to load new text into the text field, the scrollbar doesn't go back to the top. Instead it shifts to the relative position based on how much new text was loaded in. I've tried using scrollBar.update(); but that didn't help.
Any suggestions?
zee (22 Aug 2006 18:09)
i created a fucntion that always sets the textbox text to "" (empty) and then call the new content. That always updates the scrollbar for me.
horizens (23 Aug 2006 1:16)
That's a good idea. I'm trying it but still the same results.
txt.text = "";
txt.htmlText = this.contents;
i wonder if I'm calling it too soon though.
horizens (23 Aug 2006 1:24)
Actually, that works great. Used a callback function. Thanks!
zee (23 Aug 2006 1:26)
I have a global function called _global.reset
_global.reset = function() {
_root.content.contentBox.text = "";
}
Then I have globals that my buttons call. For example:
_global.getNews = function() {
//reset text area with global function
reset();
// load new html file; random to prevent file cache
_root.content.loadVariables("< http://www.thezeesite.com/cNews.html?num= >"+random(999));
};
Lastly, I apply the following to a button, in this case, the news button:
on (press) {
getNews();
}
-------------------
hope that helps!
zee (23 Aug 2006 1:27)
horizens said:
---------------
"Actually, that works great. Used a callback function. Thanks!"
---------------
Awesome! :-)
andy (29 Aug 2006 21:50)
Hi! Absolutley awesome component! But sadly I'm having trouble to get scrolling text with easing to work. As you suggested somewehere above I packed the dynamic textfield in a dummy mc. But I can't communicate with my textfield inside the scrolling area... theres no way for me to fill it with text. Scope and mc-naming is correct.
silencio (30 Aug 2006 14:27)
Andy,
You can find the path to your dummy clip like this.
1st frame inside your dummyTextClip:
onMouseDown = function () {
trace(this);
};
then you receive something like that:
_level0.scrollArea_mc.content
so you can access into it
_level0.scrollArea_mc.content1.myTextfield.text = "hello world"
hope it help.
Andy (30 Aug 2006 14:38)
Thanks a lot! It was the "content" parameter. I also found a hint to that in the API-Reference in the example.zip. Now the last thing these components need are a pretty nice Documentation / Tutorial ;)
Aaron (5 Oct 2006 22:52)
Awesome work!
What if I don't want the scroll pad to resize along with my content? LIke, I want a standard scroll pad height throughout my site, no matter how long my scrolling movie clips or text areas are?
shaman (7 Nov 2006 17:43)
GOOD WORK! Compliments!
qbol (30 Dec 2006 19:28)
a little tip for people starting out with flash like me, if you're trying to scroll a movie clip. the clip has to be "linked" first...(right click the movie in the library browser > linkage > check export for actionscript and export first frame....
bruno (15 Jan 2007 15:05)
Hi Elvis, excellent work... this component it's awesome!!!
I just have one question. How could I move the movie to scroll, and when I click the up or down arrow the movie starts to scroll from the updated position? Actually, if I do that the scroll begins to work from the original position, moving the movie to scroll to zero.
Is there a function that updates the movie to scroll position???
Thanks a lot!
ariel (17 Jan 2007 3:35)
i downloaded this component and already installed it .. but when i try the example .. it said component failed to load pls give any help .. thx
horizens (17 Jan 2007 4:04)
hi, i'm having a problem using the scrollbar component. if the scrollbar is included in a movieclip that is attached to the stage, and then the same movieclip is attached again, the entire swf file shifts to 0,0 and i get this error message:
Target not found: Target="_level0.contentBG_mc.scroller.dslider" Base="_level0"
this occurs when i have a button fire an attachMovie and then hit the button again. i know i can disable the button, but i'm wondering if there's another workaround or if anyone else is experiencing this?
Ashok (17 Jan 2007 12:42)
Hi,
I am creating dynamic menu usign createEmptyMovieClip() method. I want to add a scroll bar for that movieclip. Could you please help me on that?
Please make my day
regards
Ashok
horizens (17 Jan 2007 14:38)
ashok,
add the component to your library. open the linkage for the component and select "export in first frame".
in this example i have a textField instance "txt" and then this code:
attachMovie("VScrollbar Component (Handle)", "scroller", this.getNextHighestDepth());
with (scroller)
{
_x = txt._width + 30;
_y = txt._y;
target = txt;
__height = txt._height;
enabled = true;
}
ariel (18 Jan 2007 2:59)
i have a movieclip in on the stage and it is contain duplication movieclip base on array, how can i add ease scroll on it
pls help !
espy (21 Feb 2007 12:13)
Hey there! Brilliant component! By far the best scrollbar I've used so far. Some more documentation would be wonderful, but regardless, brilliant. Thank you very very much for making it!
am (12 Mar 2007 13:31)
hi,
i'm trying to get loading progress when using the scrollArea. I read your short API ref docs:
- mcLoader:MovieClipLoader - url property uses mcLoader to load the content; use to monitor loading process.
but i've no ideia how to use that... could someone help me out?
thx
.am
Niklas (28 Jun 2007 21:30)
Hi!
I'm using these components in my projects all the time & they rock... I have a question; Is there anyway you can set the size of these dynamically? I know you can use the setsize method like: scrollbar.setsize(scrollbar.width, 200); But what if you want for example the scrollbar to be the height of the stage where the stage is set to 100% to fill the entire window? By doing so it stretches out and distorts the graphics...
Is this approach possible?
Thanks again for some great components...
All the best, NIklas
Elvis Mehmedovic (28 Jun 2007 21:39)
Hello.
Niklas, to do this, you should not scale the stage itself. Instead, you scale everything on stage according to the dimensions of the stage, using _xscale, _yscale, _widht, _height or setSize for components. You might want to take a look at Stage object and Align Components.
HTH.
Niklas (29 Jun 2007 7:58)
Oh - thanks for getting back to me so fast!
I'm not 100% sure what you mean...sorry. :-)
Won't the dimensions of the stage change according to the users resolution? Like this page for example - flash always fills the entire screen...
Niklas
Jorge Adrian Gonzalez (14 Aug 2007 0:22)
Sorry, I'm a new flash user, and I found this components cassually, I look them so nice, but I don't know how use them, please, can you help me, I have flash 8 on my pc. Please!!!! Sorry about my english, Im from mexico jiji!!!
Jochen (5 Feb 2008 13:07)
Hey,
I have a little question, where can i see all the public functions to controll the scrollbar/scrollarea components? I have a problem with the scrollbar where when you click on the up or down arrows of the scrollbar, it will scroll the first time you click but from then on do nothing, then when you move the mouse it will work for 1 time again....really strange.
I linked a clip from the library to the scrollArea, then that clip is dynamicly filled with other movieclips and info, the scrollbar adjust to the right size and everything, it's just the 1 time click problem.
hope you can help me out & thanks for all these wonderfull components that makes the lives off a lot of developers a whole lot easier :-)
f_aeon@yahoo.com (4 Mar 2008 7:49)
i can't seem to install xmca 0.3 components for flash cs3. do you have any solutions?
goin@goin.gr (12 Mar 2008 14:41)
hi all. i want to scroll the component with AS! the textarea name is textRoot the component name is textScroll and the action is textRoot.setScrollPosition(700,700); but not working!!!
Elvis Mehmedovic (12 Mar 2008 14:50)
You can use: myScrollAreaComp.scroll = myX + 1; // vertical position myScrollAreaComp.xhscroll = myY + 1; // horizontal position (This is analogous to scrolling a TextField.)
dasdad (19 Mar 2008 7:00)
dasdsad
morcou@gmail.com (14 May 2008 0:15)
excellent component! you've save the lifes of thousands of designers. But, i have a problem.. im using the mask area component with a vscrollbar component, and works perfect except when the movieclip to scroll is very large. The scrollbar scrolls farder than the movieclip really is. Any ideas? Thanks a lot! Jay,
ppduquette@gmail.com (15 May 2008 15:05)
Hi Elvis, These components are great! I've been going around the Web and these are by far the best I've found. One question, how can I verify the loadProgress of the scrollArea components? I've tried using something like this but did not succeed. var dataObject:Object = new Object(); dataObject.onLoadProgress = function(target_mc:MovieClip):Void { trace("progress"); }; dataObject.onLoadComplete = function(target_mc:MovieClip):Void { trace("complete"); }; mcLoader.addListener(dataObject); Thanks Phil
Niklas (9 Jun 2008 13:11)
Hi there! I have the same problem as Jay above has. When I attach a clip from the library and it's larger than your scrollarea component it ads to the length of the attached clip. I tried to use the update(); of the scroller but no luck. If I remove the scroller and use the mousewheel for scrolling same thing happens. Does anyone know why this is happening? Niklas
Rowan (2 Jul 2008 13:23)
Fantastic Component, thank you so much. Although I have a very basic question for you... How do I resize the bar to fit the text window? Its not 'snapping' to the correct size and isnt responding when I use the transform tool Thanks again
Carlos (18 Sep 2008 16:33)
Hi there! First of all, thank you very much for all your components. Very useful. I have a problem, I have two diferents MC, both using the same scrollbar simple (in fact, is the same MC duplicated, I just changed the title and text). But when I browse the page, one works, but when I open the second one, both start to fail. Should I duplicate the component in the library? Thanks a lot. < carlos@castel.com.ar >
David (24 Sep 2008 13:29)
This is great! Thank you! One question. I'm dynamically creating an instance of the scrollBar using attachMovie(). How can I set the target? I've tried everything that I can imagine and can't get it to activate. Thanks!
David (24 Sep 2008 14:07)
Okay, nevermind. It was working, I just forgot to set the "enabled" parameter. I guess we all have off days. :)
rodolfo (27 Sep 2008 2:41)
just in case anybody needs it, this is how u scroll via AS: scrollbar.doScroll(0);
Ash (29 Jan 2009 17:34)
Its a bit of an issue that when you call dynamic text from xml into a maskarea it doesn't reset the maskarea and the scrollbar. Any ideas?
Eduardo Miranda (4 Apr 2009 0:24)
testandio
Riccardo Sallusti (14 Jul 2009 14:58)
I have a big problem with this wonderful component: the scrollTo method does NOT work! I've tryed it in a thousand ways but it desn't. I've also tryed to trace the method (i.e. trace(myScrollBar.scrollTo) and it doesn't exists. Is there anything wrong? Thanks PS: I MUST use the as2 version. No way.
Riccardo Sallusti (14 Jul 2009 15:44)
RESOLVED: I've used the method doScroll(0) and it worked. I had to look at the source of the scrollbar component :)
fdsgg (18 Sep 2009 9:54)
ssssssgg
sssss (29 Oct 2009 2:53)
sss
Daneil (11 Nov 2009 5:21)
Hi Elvis, Thank for these wonderful components, they are very useful to every one . Hope you would consider this as suggestion. THERE SHOULD BE MORE DOCUMENTATION. Not everyone can digg into code . so consider adding more documentation. It should take much time to you.
maren10@gmail.com (2 Sep 2010 14:52)
hi this is great just one question, is there a way to make the nob always the same size ? cause i made a rounded one and when i add info or remove it from the box it stretches and doesnt look good. Thanks !