Reference for TouchScroller CS

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.

 

TouchScroller.load()

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");

 

TouchScroller.scrollTo()

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);

 

TouchScroller.scrollToTop()

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();

 

TouchScroller.scrollToBottom()

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();

 

TouchScroller.scrollToLeft()

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();

 

TouchScroller.scrollToRight()

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();

 

TouchScroller.setScale()

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);

 

TouchScroller.refresh()

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

completeEvent.COMPLETE

Broadcast when the image/movie just loaded.

initEvent.INITDispatched 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.

progressProgressEvent.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

sourceStringThe path to the jpg, png or swf.
""
url to the file
autoLoadBooleanAuto load the source when the loader start. truetrue/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
motionTimeNumber The time of scrolling motion. .5 secPositive Number
motionTypeString The type of scrolling motion.easeOutSineAny 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
loaderSkinStringThe 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
 
Item Parameter Name Description
1 source The path of the jpg, png or swf file.
2 autoLoad Enable/disable auto load the source when the loader start.
3 resizeType The type of resize for the content.
     
 
Item Parameter Name Description
1 fadeTransitionType The transition type of the animation.
2 fadeTime The transition time of the animation. ( in seconds)
3 resizeTransitionType The transition type of the animation.
4 resizeTime The transition time of the animation. ( in seconds)
     
 
Item Parameter Name Description
1 border The thickness of border.
2 borderColor The color of the border.
3 shadow The value of the shadow effect
4 loaderSkin The class name for the skin of the loading animation
5 fcConnect The instance name of Digicrafts component which support FcConnect
     
 
Item Parameter Name Description
1
-
Load Preset Button
2
-
Save Preset Button