Skip to main content
Participant
March 25, 2010
Question

How can I skin the TextLayout scrollbar?

  • March 25, 2010
  • 1 reply
  • 718 views

I've been searching online for hours about how to skin the scrollbar component thats embedded in the TextLayout component. I'm using Flash CS4 and Actionscript 3. I'm guessing it is very similar to skinning other components, but it doesn't seem to work the same way. Here's one line of code I'm trying:

myTextLayoutComponent.setStyle("thumbUpSkin", "SliderThumbUp");

where "myTextLayoutComponent" is the instance name of the TextLayout component, "thumbUpSkin" is the Style's skin I want to change, and "SliderThumbUp" is the Class name of a MovieClip in my library.

This same code works perfectly with the ComboBox component, UIScrollBar, and similarly with other components.

The documentation has all the skins listed in the "Styles" area, but this code does absolutely nothing. Does anyone have a clue how this can be accomplished? I'm guessing I'm very close, but missing something! I haven't been able to find anything online about skinning this new TextLayout component with ActionScript. Any help will be greatly appreciated.

Here's a link to the documentation if it's at all helpful:

http://livedocs.adobe.com/labs/textlayout/fl/controls/TextLayout.html

Thanks!

This topic has been closed for replies.

1 reply

Adobe Employee
March 26, 2010

TLF itself doesn't include a scroll bar, we just have the internal support necessary for scrolling. The scroll bar itself is supplied as part of Flash. If you have picked up the Flash Component for TLF, I think it is rather old now -- it uses a version of TLF that dates from more than a year ago. We have a new version out now that is much better. But it does not come with a component for Flash. I would suggest getting the new version of TLF from the Flex open source at http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK. You don't have to use Flex to use TLF, its just the best way to get the most up to date version. Then you can use the TLF libraries in Flash, although not with the Flash component. You will have to build your own component in Flash. Alternatively, you could wait for Flash CS5 (see cslaunch.adobe.com), which will have support for TLF.