Scrollbox

Kind of class: public class
Package:
Inherits from:
  • Sprite
Version: 14 Apr 2010
Author: John Polacek, john@johnpolacek.com
Classpath: com.johnpolacek.ui.Scrollbox
File last modified: Friday, 12 November 2010, 15:34:14
Simple scrollbar class for full screen flash apps
Example

  • // create scrollbox for container sprite masked to 400 pixels high, 
    // with a scrubber 40 pixels high with a color of 0x0099999 and a 
    // track color of 0x003333 (100% opacity) with a width of 10 pixels
    var scrollbox:Scrollbox = new Scrollbox(400, 0x009999, 1, 0x003333, 1, 10, 40);
    scrollbox.setContent(container);
    addChild(scrollbox);
    

Summary

Constructor
  • Scrollbox (h:int, sc:uint = 0xFFFFFF, sa:Number = .5, tc:uint = 0x000000, ta:Number = .25, t:int = 16, sh:int = 80)
Instance properties
Instance methods

Constructor

Scrollbox

function Scrollbox(h:int, sc:uint = 0xFFFFFF, sa:Number = .5, tc:uint = 0x000000, ta:Number = .25, t:int = 16, sh:int = 80)
Parameters
 

Instance properties

scrollbar

scrollbar:Scrollbar(read,write)

Instance methods

onScroll

function onScroll(event:UIEvent) : void

Scrolls content

setContent

function setContent(c:Sprite) : void

Sets the content