View Full Version : UIscrollbar tutorial?
pcmxa
03-03-2007, 01:35 AM
Hello,
Can someone point me to a tutorial (or at least an FLA) for customizing the UIscrollbar? I am going a bit crazy trying to set the scrolltrackcolor. And the info on livedocs and in the flash help just isn't doing it for me. Thanks.
inhan
03-03-2007, 02:17 AM
Flash help is so bad at component styles, I can definitely agree with that.
Anyway here's a Q&A from the livedocs of Adobe:
Q: Why when I try in my main timeline using scrollbar_instancename.setStyle("scrollTrackColor","0xFF0000"); it doesnt work. I also tried adding the same code to the scroll bar as an onClipEvent(load) using 'this' instead of the instance name. Is there something I'm missing?
A: scrollTrackColor is only available for the "Sample" theme. To learn more about switching themes, see the Customizing Components chapter: http://livedocs.macromedia.com/flash/8/main/00003010.html
inhan
03-03-2007, 02:34 AM
I haven't checked the link but I found a semi-solution:
1. File > Import > Open external library
2. In Windows: C:\Program Files\Macromedia\Flash 8\language\Configuration\ComponentFLA\
On the Macintosh: HD/Applications/Macromedia Flash 8/Configuration/ComponentFLA/
3. in the ext. library window:
Flash UI Components 2 > Themes > MMDefault
drop the "ScrollBar Assets" folder into your library
4. in your library, right click
ScrollBar Assets > ScrollBarAssets (movie clip) and in the linkage prefs select export in the first frame option.
5. If you're calling the scrollBar dynamically, use something like:
this.createClassObject(mx.controls.UIScrollBar, "my_sb", 2, {scrollTrackColor:0x4396CD});
Bad news is this scroll bar looks so old. You might wanna change a couple of things visually.
pcmxa
03-03-2007, 03:33 AM
Thanks, That explained what was going wrong. Combined with adjusting the skin I have the scroll bar working the way I want.
inhan
03-03-2007, 03:51 AM
You're welcome. I didn't know the solution either, I'm glad that I have learned it too.
|
vBulletin® v3.8.5, Copyright ©2000-2010, Jelsoft Enterprises Ltd.