Click to See Complete Forum and Search --> : Scroll Bars?
blanius
08-29-2005, 10:07 PM
Any manage to make a custom scroll bar for a text area? I've tried using a tutorial from a book and have come close. I've gotten hung up on the dragging of the slider. The default scroll bar is just terrible and doesn't even look to the end user like what they expect a scroll bar to look like.
Brant surely there is a way to pull the code from you scroll pane to make a nice scrollbar component for KM
FLASHPULSE
08-30-2005, 12:07 AM
Remus has one on his site.
http://necromanthus.com/KoolMoves/ScrollBar.html
w.brants
08-30-2005, 01:06 AM
As for creating new components, don't expect any new components based on the current code. Since we have a symbol library know, if I'll create other components they will be based on that functionality and will look different.
But you can use the scrollbar from the scrollpane component.
If your textfield is named txt1, try thismyStyle = new KStyleFormat();
myStyle.background = 0xF0E0C0;
myStyle.face = 0x50F090;
myStyle.scrollBar = 0x80C0FF;
myStyle.gradient=false;
myStyle.shaded=true;
myStyle.liquid=true;
CreateKScrollBar("scroller1",1,txt1);
scroller1.setStyle(myStyle);
Make sure you check the box in the export settings to include components. If you already have something at depth 1, change the second parameter of CreateKScrollBar.
Bob Hartzell
08-30-2005, 08:04 AM
Version 5.1 should/might have a new dynamic text object with scroll bar based on Flash 8 functionality. Wilbert will be developing it. Wilbert, if you want, post the nice scroll bar example you sent me.
w.brants
08-30-2005, 08:37 AM
Wilbert, if you want, post the nice scroll bar example you sent me.
Okay, attached is a little gif file how the scroller (most likely) will look like.
Since it's no secret anymore now Bob mentioned it I might as well share some information on what I want to accomplish so users can give feedback if they feel I'm missing something.
My goal is to create a flash 8 based general content component for displaying text, swf movies or images.
I'm planning to implement the following content types :
- (html)text (read-only); both direct assignment and external files
- movies ; both swf files and movies in the symbol library
- (progressive) jpeg files
- (transparent) gif files
- (transparent) png files
I'll try to keep the code small meaning I won't implement all features the current components have and add some others. You will be able to set colors as you want but won't be able to change the style of a component already on stage and you won't be able to use liquid style anymore.
You will be able to auto hide one of the two scrollers (asked for multiple times for the current scrollpane component).
You will be able to select a cross-fade or pixel dissolve transition when you assign new content.
All this of course if I succeed in implementing it. For now most of it only exists inside my mind. :)
blanius
08-30-2005, 01:59 PM
Looks great Brants, the code for the old komponents worked fine with one exception. The scroll bar is not updated when the text changes. How can I fource it to update?
w.brants
08-30-2005, 02:26 PM
Do you mean if you use the textfield for input or when you reassign text ?
The scroller is supposed to monitor changes in the textfield and update itself.
docree
08-30-2005, 04:29 PM
Did I hear right? No liquid style???
Gotta check if I use it or need it.
I might not need it. Though, I like to use "curves" in my designs.
blanius
08-30-2005, 04:33 PM
Do you mean if you use the textfield for input or when you reassign text ?
The scroller is supposed to monitor changes in the textfield and update itself.
It's when I load dynamic text it doesn't update.
w.brants
08-31-2005, 01:15 AM
Bret,
Does it help to force an update after setting the text ?myScroller.kRefresh();
Docree,
You heard it right. There's two important reasons for that decision. The first and most important one the amount of code it takes to implement. The second one a change in personal design preference; to me the liquid style is beginning to feel a bit outdated by now.
blanius
08-31-2005, 08:28 AM
Hmm it seems to be an related to the fact that this is in a loaded movie.
Update was happening when run stand alone, but not when loaded into my root movie.
check out equipment button:
http://prconsultantsvideoandfilmllc.com/
then alone
http://prconsultantsvideoandfilmllc.com/equipment.swf
pherbrick
08-31-2005, 02:34 PM
Wilbert, Archive the liquid style code where you can find it. If lava lamps could make a comeback....
w.brants
08-31-2005, 02:51 PM
Wilbert, Archive the liquid style code where you can find it. If lava lamps could make a comeback....
:D Don't worry Peter, I will. Besides that, Bob also has the source code.
Bret, to be honest I haven't got a solution to your problem. It may have to do with the interval function the scroller uses to monitor the textfield. Does it make any difference if you disable the interval function of your main movie (just to test) ?
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.