Method | Description |
---|---|
load() | Load source. |
scrollTo() | Scroll to postion x, y |
scrollToTop() | Scroll to top postion |
scrollToBottom() | Scroll to bottom postion |
scrollToRight() | Scroll to right postion |
scrollToLeft() | Scroll to left postion |
setScale() | Set the scale of content |
refresh() | Refresh the scrollbar. |
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.load(url)
Parameters
url: URL of external png, jpg or swf.
Returns None
Description Method; Load the image or movie.
Code Example :
//load the image or movie.
loader_mc.load("photo.jpg");
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.scrollTo(x,y)
Parameters
x,y: postion of the target position
Returns None
Description Method; Scroll the content to location x, y
Code Example :
loader_mc.scrollTo(100,100);
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.scrollToTop(pageScroll)
Parameters
pageScroll: True/False: indicate where to limit scroll to one page.
Returns None
Description Method; Scroll the content to top.
Code Example :
loader_mc.scrollToTop();
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.scrollToBottom(pageScroll)
Parameters
pageScroll: True/False: indicate where to limit scroll to one page.
Returns None
Description Method; Scroll the content to bottom.
Code Example :
loader_mc.scrollToBottom();
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.scrollToLeft(pageScroll)
Parameters
pageScroll: True/False: indicate where to limit scroll to one page.
Returns None
Description Method; Scroll the content to left.
Code Example :
loader_mc.scrollToLeft();
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.scrollToRight(pageScroll)
Parameters
pageScroll: True/False: indicate where to limit scroll to one page.
Returns None
Description Method; Scroll the content to right.
Code Example :
loader_mc.scrollToRight();
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.setScale(scale)
Parameters
scale: The scale of the content. 1 is 100%
Returns None
Description Method; Set the scale of the content.
Code Example :
loader_mc.setScale(1.5);
Availability Flash Player 9.
Edition Flash CS3.
Usage TouchScroller.refresh()
Parameters
none
Returns None
Description Method; Refresh the scrollbar. This will recalucalte the scrollbar setting.
Code Example :
loader_mc.refresh();
To use event, you need to import the library:
import flash.events.*;
Event | Object | Description |
---|---|---|
complete | Event.COMPLETE | Broadcast when the image/movie just loaded. |
init | Event.INIT | Dispatched when the properties and methods of a loaded SWF file are accessible. |
ioError | IOErrorEvent.IO_ERROR | Dispatched when an input or output error occurs that causes a load operation to fail. |
progress | ProgressEvent.PROGRESS | Dispatched when data is received as the download operation progresses. |
Code Example :
import com.digicrafts.controls.*;
function itemH(event:Event):void {
switch(event.type) {
//Event when load completed
case Event.COMPLETE:
brea;
}
}
scroller_mc.addEventListener(Event.COMPLETE,itemH);
Property | Type | Description | Default Value | Possible Value |
---|---|---|---|---|
source | String | The path to the jpg, png or swf. | "" | url to the file |
autoLoad | Boolean | Auto load the source when the loader start. | true | true/false |
verticalScrollPolicy | String | Define the policy for displaying the vertical scroll bar. | "AUTO" | AUTO, ON, OFF |
horizontalScrollPolicy | String | Define the policy for displaying the horizontal scroll bar. | "AUTO" | AUTO, ON, OFF |
verticalScrollBarName | String | Instance name of vertical scrollbar. Can be a UIScroller or Slider. | "" | String |
horizontalScrollBarName | String | Instance name of horizontal scrollbar. Can be a UIScroller or Slider. | " | String |
motionTime | Number | The time of scrolling motion. | .5 sec | Positive Number |
motionType | String | The type of scrolling motion. | easeOutSine | Any String |
blurEffectEnabled | Boolean | Enable/disable blur effect. | true | true/false |
touchScrollEnabled | Boolean | Enable/disable touch scroll. | true | true/false |
touchScrollDirection | Boolean | Enable/disable revse touch scroll direction. | false | true/false |
touchScrollSnap | Boolean | Enable/disable touch scroll snap. | false | true/false |
wheelScrollEnabled | Boolean | Enable/disable scroll by mouse wheel. | true | true/false |
loaderSkin | String | The class name use of the skin for the loading animation | "" | Any class name of movieclip symbol |
content | DisplayObject | The content of the loaded item. | readonly | readonly |
isLoading | Boolean | Indicate whether the content is loading | readonly | readonly |
| ||||||||||||||||||||||
| ||||||||||||||||||||||
| ||||||||||||||||||||||
|