TextScrollbar Component
The TextScrollBar component allows you to add a scroll bar to a text field. You can add a scroll bar to a text field while authoring, or at runtime with ActionScript.
The TextScrollBar component functions like any other scroll bar. It contains arrow buttons at either end and a scroll track and scroll box (thumb) in between. It can be attached to any edge of a text field and used both vertically and horizontally.
Below are parameters, properties, events and methods of TextScrollbar component. If you want to learn how to use TextScrollbar component in Sothink SWF Easy, you may link to page Use TextScrollbar.
1. Initialization Parameters:
Parameter | Property Value | Description | Default Value |
_targetName | String | Indicates the name of the text field instance that the UIScrollBar component is attached to. | NONE |
horizontal | Boolean | Indicates whether the scroll bar is oriented horizontally (true) or vertically (false). | false |
enabled | Boolean | Indicates whether the component can receive focus and input. | true |
2. Properties:
Property | Description |
lineScrollSize | The number of lines or pixels scrolled when the user clicks the arrow buttons of the scroll bar. |
pageScrollSize | The number of lines or pixels scrolled when the user clicks the track of the scroll bar. |
scrollPosition | The current scroll position of the scroll bar. |
_targetName | The instance name of the text field associated with the UIScrollBar instance. |
horizontal | A Boolean value indicating whether the scroll bar is oriented vertically (false), the default, or horizontally (true). |
3. Events:
Event | Description |
scroll | Broadcast when any part of the scroll bar is clicked. |
resize | Broadcast when an object has been resized. |
4. Methods:
Method | Property | Description |
setScrollProperties | (pageSize, minPos, maxPos) | Sets the scroll range of the scroll bar and the size of the text field that the scroll bar is attached to. |
setScrollTarget | (textInstance) | Assigns the scroll bar to a text field. |
setStyle | (propertyName, propertyValue) | Sets the style property on the style declaration or object. |
setSize | (width, height, noEvent) | Resizes the object to the requested size. |
For TextScrollbar component, method setStyle has many properties settings. Below is a swf file demonstrating the style of textscrollbar component. Mouse over the different items and you will see the style direction.
AC_FL_RunContent( ‘codebase’,'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0′,’width’,’240′,’height’,’280′,’src’,’../c-image/scroll’,'quality’,'high’,'pluginspage’,'http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash’,'movie’,’../c-image/scroll’ ); //end AC code
propertyName | properyValue | Default Value |
themeColor | color value | 0×0 |
arrColor | color value | 0×0 |
butHighColor | color value | 0xffffff |
butLowColor | color value | 0xD9DDE8 |
butBeginColor | color value | 0xffffff |
butEndColor | color value | 0xcccccc |
butFrameColor | color value | 0xbbbbbb |
backBeginColor | color value | 0xEFF0F5 |
backEndColor | color value | 0xFDFDFE |
backFrameColor | color value | 0xbbbbbb |
blockBeginColor | color value | 0xdddddd |
blockEndColor | color value | 0xbbbbbb |
blockFrameColor | color value | 0xeeeeee |
blockHighColor | color value | 0xcccccc |