Scrollbar Component
The ScrollBar component allows you to add a scroll bar to many elements, like text and image. The Scrollbar contains arrow buttons at either end and a scroll track and scroll box (thumb) in between. It can be used both vertically and horizontally.
Below are parameters, properties, events and methods of Scrollbar component. If you want to learn how to use Scrollbar component in Sothink SWF Easy, you may link to page Use Scrollbar.
1. Initialization Parameters:
Parameter | Property Value | Description | Default Value |
horizontal | Boolean | Indicates whether the scroll bar is oriented horizontally (true) or vertically (false). | false |
lineScrollSize | number | The number of lines or pixels scrolled when the user clicks the arrow buttons of the scroll bar. | 5 |
pageScrollSize | number | The number of lines or pixels scrolled when the user clicks the track of the scroll bar. | 20 |
pageSize | number | The number of items that can be viewed in the display area. | 0 |
minPos | number | This parameter refers to the lowest numbered line of text when the scroll bar is used vertically, or the lowest numbered pixel in the text field’s bounding box when the scroll bar is used horizontally. The value is usually 0. | 0 |
maxPos | number | This value refers to the highest numbered line of text when the scroll bar is used vertically, or the highest numbered pixel in the text field’s bounding box when the scroll bar is used horizontally. | 0 |
enabled | Boolean | Indicates whether the component can receive focus and input. | true |
2. Properties:
Property | Description |
horizontal | A Boolean indicating whether the scroll bar is oriented horizontally (true) or vertically (false). |
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. |
pageSize | The number of items that can be viewed in the display area. |
minPos | This parameter refers to the lowest numbered line of text when the scroll bar is used vertically, or the lowest numbered pixel in the text field’s bounding box when the scroll bar is used horizontally. The value is usually 0. |
maxPos | This value refers to the highest numbered line of text when the scroll bar is used vertically, or the highest numbered pixel in the text field’s bounding box when the scroll bar is used horizontally. |
scrollPosition | The current scroll position of the scrollbar. The default value is 0 and it should between the values of maxPos and minPos |
enabled | Indicates whether the component can receive focus and input. |
Note: pageSize, minPos and maxPos are set by method setScrollProperties.
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. |
setStyle | (propertyName, propertyValue) | |
setSize | (width, height, noEvent) | Resizes the object to the requested size. |
For Scrollbar component, method setStyle has many properties settings. Below is a swf file demonstrating the style of scrollbar 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 | propertyValue | Default Value |
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 |