Scrollbar

Kind of class: public class
Package:
Inherits from:
  • Sprite
Classpath: com.johnpolacek.ui.Scrollbar
File last modified: Friday, 12 November 2010, 15:34:14

Summary

Constructor
  • Scrollbar (trackLength:int, scrubberColor:uint = 0xFFFFFF, scrubberAlpha:Number = .5, tc:uint = 0x000000, ta:Number = .25, t:int = 16, sl:int = 80, v = true)
Instance properties
  • percent : Number
    • Percent scrolled (0=none 1=max)
  • clickPercent : Number
    • Percent scrolled when track is clicked
  • isTweening : Boolean
    • When content is tweening, block clicks/scrubbing events
  • isActive : Boolean
    • Toggled by transitionIn() and transitionOut()
  • scrubber : Sprite
  • track : Sprite
Instance methods
  • doScroll (p:Number) : void
    • Initiates scrolling
  • setClickPercent (cp:Number) : void
    • Assigns percentage scrolled on a single track click (clickPercent value)

Constructor

Scrollbar

function Scrollbar(trackLength:int, scrubberColor:uint = 0xFFFFFF, scrubberAlpha:Number = .5, tc:uint = 0x000000, ta:Number = .25, t:int = 16, sl:int = 80, v = true)
Parameters
 

Instance properties

clickPercent

clickPercent:Number = .2(read,write)

Percent scrolled when track is clicked

isActive

isActive:Boolean = false(read,write)

Toggled by transitionIn() and transitionOut()

isTweening

isTweening:Boolean = false(read,write)

When content is tweening, block clicks/scrubbing events

percent

percent:Number(read,write)

Percent scrolled (0=none 1=max)

scrubber

scrubber:Sprite(read,write)

track

track:Sprite(read,write)

Instance methods

doScroll

function doScroll(p:Number) : void

Initiates scrolling

Parameters
p:Sets percent to scroll to

setClickPercent

function setClickPercent(cp:Number) : void

Assigns percentage scrolled on a single track click (clickPercent value)

Parameters
cp:Sets clickPercent value