PDA

View Full Version : seperating textArea alpha from scroll bar alpha


idyllhands
05-24-2007, 12:27 AM
Hi
Anyone know of a way to edit the properties of a text Area's scroll bar?
like change its colors, graphics, etc?

alexandre.madurell
05-24-2007, 12:44 AM
Hi!

Check the livedocs for UIScrollBar component:

http://livedocs.adobe.com/flash/8/main/00004219.html

The example at setScrollTarget() should be enough for what you intend to do.

Another example. I have a MovieClip named content_mc which contains a text field named content_txt and an instance of the UIScrollBar named content_sb. The code goes something like:

content_mc.content_sb.setScrollTarget(content_mc.c ontent_txt);
content_mc.content_sb.setSize(16, content_mc.content_txt._height);
content_mc.content_sb._x=content_mc.content_txt._x +content_mc.content_txt._width+14;
content_mc.content_sb._y=content_mc.content_txt._y ;
content_mc.content_sb.lineScrollSize = 2;
content_mc.content_sb.pageScrollSize = 5;

You could easily add something like:

content_mc.content_txt._alpha=60;
content_mc.content_sb._alpha=80;

[Note: Those 14 pixels are there for padding between scrollbar and textbox]

Hope it helps ;)