ActionScript® 3.0 Reference for the Adobe® Flash® Platform
Home  |  Hide Packages and Classes List |  Packages  |  Classes  |  What's New  |  Index  |  Appendixes

Language Reference only
Filters: AIR 32.0 and earlier, Flash Player 32.0 and earlier, Flash Lite 4
Flex 4.6 and earlier, Flash Pro CS6 and earlier
Hide Filters
fl.containers 

ScrollPane  - AS3 Flash

Packagesx

Top Level
adobe.utils
air.desktop
air.net
air.update
air.update.events
coldfusion.air
coldfusion.air.errors
coldfusion.air.events
coldfusion.service
coldfusion.service.events
coldfusion.service.mxml
com.adobe.acm.solutions.authoring.domain.extensions
com.adobe.acm.solutions.ccr.domain.extensions
com.adobe.consulting.pst.vo
com.adobe.dct.component
com.adobe.dct.component.datadictionary
com.adobe.dct.component.datadictionaryElement
com.adobe.dct.component.dataElementsPanel
com.adobe.dct.component.toolbars
com.adobe.dct.event
com.adobe.dct.exp
com.adobe.dct.model
com.adobe.dct.service
com.adobe.dct.service.provider
com.adobe.dct.transfer
com.adobe.dct.util
com.adobe.dct.view
com.adobe.ep.taskmanagement.domain
com.adobe.ep.taskmanagement.event
com.adobe.ep.taskmanagement.filter
com.adobe.ep.taskmanagement.services
com.adobe.ep.taskmanagement.util
com.adobe.ep.ux.attachmentlist.component
com.adobe.ep.ux.attachmentlist.domain
com.adobe.ep.ux.attachmentlist.domain.events
com.adobe.ep.ux.attachmentlist.domain.renderers
com.adobe.ep.ux.attachmentlist.skin
com.adobe.ep.ux.attachmentlist.skin.renderers
com.adobe.ep.ux.content.event
com.adobe.ep.ux.content.factory
com.adobe.ep.ux.content.handlers
com.adobe.ep.ux.content.managers
com.adobe.ep.ux.content.model.asset
com.adobe.ep.ux.content.model.preview
com.adobe.ep.ux.content.model.relation
com.adobe.ep.ux.content.model.search
com.adobe.ep.ux.content.model.toolbar
com.adobe.ep.ux.content.search
com.adobe.ep.ux.content.services
com.adobe.ep.ux.content.services.load
com.adobe.ep.ux.content.services.permissions
com.adobe.ep.ux.content.services.preview
com.adobe.ep.ux.content.services.providers
com.adobe.ep.ux.content.services.query
com.adobe.ep.ux.content.services.relationships
com.adobe.ep.ux.content.services.search.lccontent
com.adobe.ep.ux.content.services.version
com.adobe.ep.ux.content.view
com.adobe.ep.ux.content.view.components.activate
com.adobe.ep.ux.content.view.components.grid
com.adobe.ep.ux.content.view.components.grid.hover
com.adobe.ep.ux.content.view.components.grid.hover.component
com.adobe.ep.ux.content.view.components.grid.renderers
com.adobe.ep.ux.content.view.components.relationships
com.adobe.ep.ux.content.view.components.review
com.adobe.ep.ux.content.view.components.search.renderers
com.adobe.ep.ux.content.view.components.searchpod
com.adobe.ep.ux.content.view.components.toolbar
com.adobe.ep.ux.content.view.components.toolbar.controlRenderers
com.adobe.ep.ux.content.view.components.version
com.adobe.ep.ux.documentsubmit.component
com.adobe.ep.ux.documentsubmit.domain
com.adobe.ep.ux.documentsubmit.skin
com.adobe.ep.ux.taskaction.component
com.adobe.ep.ux.taskaction.domain
com.adobe.ep.ux.taskaction.domain.events
com.adobe.ep.ux.taskaction.skin
com.adobe.ep.ux.taskdetails.component
com.adobe.ep.ux.taskdetails.domain
com.adobe.ep.ux.taskdetails.skin
com.adobe.ep.ux.tasklist.component
com.adobe.ep.ux.tasklist.domain
com.adobe.ep.ux.tasklist.skin
com.adobe.ep.ux.webdocumentviewer.domain
com.adobe.exm.expression
com.adobe.exm.expression.error
com.adobe.exm.expression.event
com.adobe.exm.expression.impl
com.adobe.fiber.runtime.lib
com.adobe.fiber.services
com.adobe.fiber.services.wrapper
com.adobe.fiber.styles
com.adobe.fiber.util
com.adobe.fiber.valueobjects
com.adobe.gravity.binding
com.adobe.gravity.context
com.adobe.gravity.flex.bundleloader
com.adobe.gravity.flex.progress
com.adobe.gravity.flex.serviceloader
com.adobe.gravity.framework
com.adobe.gravity.init
com.adobe.gravity.service.bundleloader
com.adobe.gravity.service.logging
com.adobe.gravity.service.manifest
com.adobe.gravity.service.progress
com.adobe.gravity.tracker
com.adobe.gravity.ui
com.adobe.gravity.utility
com.adobe.gravity.utility.async
com.adobe.gravity.utility.error
com.adobe.gravity.utility.events
com.adobe.gravity.utility.factory
com.adobe.gravity.utility.flex.async
com.adobe.gravity.utility.logging
com.adobe.gravity.utility.message
com.adobe.gravity.utility.sequence
com.adobe.gravity.utility.url
com.adobe.guides.control
com.adobe.guides.domain
com.adobe.guides.i18n
com.adobe.guides.spark.components.skins
com.adobe.guides.spark.components.skins.mx
com.adobe.guides.spark.headers.components
com.adobe.guides.spark.headers.skins
com.adobe.guides.spark.layouts.components
com.adobe.guides.spark.layouts.skins
com.adobe.guides.spark.navigators.components
com.adobe.guides.spark.navigators.renderers
com.adobe.guides.spark.navigators.skins
com.adobe.guides.spark.util
com.adobe.guides.spark.wrappers.components
com.adobe.guides.spark.wrappers.skins
com.adobe.guides.submit
com.adobe.icc.dc.domain
com.adobe.icc.dc.domain.factory
com.adobe.icc.editors.events
com.adobe.icc.editors.handlers
com.adobe.icc.editors.managers
com.adobe.icc.editors.model
com.adobe.icc.editors.model.config
com.adobe.icc.editors.model.el
com.adobe.icc.editors.model.el.operands
com.adobe.icc.editors.model.el.operators
com.adobe.icc.enum
com.adobe.icc.external.dc
com.adobe.icc.obj
com.adobe.icc.services
com.adobe.icc.services.category
com.adobe.icc.services.config
com.adobe.icc.services.download
com.adobe.icc.services.export
com.adobe.icc.services.external
com.adobe.icc.services.formbridge
com.adobe.icc.services.fragmentlayout
com.adobe.icc.services.layout
com.adobe.icc.services.letter
com.adobe.icc.services.locator
com.adobe.icc.services.module
com.adobe.icc.services.render
com.adobe.icc.services.submit
com.adobe.icc.services.user
com.adobe.icc.token
com.adobe.icc.vo
com.adobe.icc.vo.render
com.adobe.icomm.assetplacement.controller
com.adobe.icomm.assetplacement.controller.utils
com.adobe.icomm.assetplacement.data
com.adobe.icomm.assetplacement.model
com.adobe.livecycle.assetmanager.client
com.adobe.livecycle.assetmanager.client.event
com.adobe.livecycle.assetmanager.client.handler
com.adobe.livecycle.assetmanager.client.managers
com.adobe.livecycle.assetmanager.client.model
com.adobe.livecycle.assetmanager.client.model.cms
com.adobe.livecycle.assetmanager.client.service
com.adobe.livecycle.assetmanager.client.service.search
com.adobe.livecycle.assetmanager.client.service.search.cms
com.adobe.livecycle.assetmanager.client.utils
com.adobe.livecycle.content
com.adobe.livecycle.rca.model
com.adobe.livecycle.rca.model.constant
com.adobe.livecycle.rca.model.document
com.adobe.livecycle.rca.model.participant
com.adobe.livecycle.rca.model.reminder
com.adobe.livecycle.rca.model.stage
com.adobe.livecycle.rca.service
com.adobe.livecycle.rca.service.core
com.adobe.livecycle.rca.service.core.delegate
com.adobe.livecycle.rca.service.process
com.adobe.livecycle.rca.service.process.delegate
com.adobe.livecycle.rca.token
com.adobe.livecycle.ria.security.api
com.adobe.livecycle.ria.security.service
com.adobe.mosaic.layouts
com.adobe.mosaic.layouts.dragAndDrop
com.adobe.mosaic.layouts.interfaces
com.adobe.mosaic.mxml
com.adobe.mosaic.om.constants
com.adobe.mosaic.om.events
com.adobe.mosaic.om.impl
com.adobe.mosaic.om.interfaces
com.adobe.mosaic.skinning
com.adobe.mosaic.sparklib.editors
com.adobe.mosaic.sparklib.optionMenu
com.adobe.mosaic.sparklib.scrollableMenu
com.adobe.mosaic.sparklib.scrollableMenu.skins
com.adobe.mosaic.sparklib.tabLayout
com.adobe.mosaic.sparklib.tabLayout.events
com.adobe.mosaic.sparklib.tabLayout.layouts
com.adobe.mosaic.sparklib.tabLayout.skins
com.adobe.mosaic.sparklib.text
com.adobe.mosaic.sparklib.util
com.adobe.solutions.acm.authoring.presentation
com.adobe.solutions.acm.authoring.presentation.actionbar
com.adobe.solutions.acm.authoring.presentation.common
com.adobe.solutions.acm.authoring.presentation.events
com.adobe.solutions.acm.authoring.presentation.fragment
com.adobe.solutions.acm.authoring.presentation.letter
com.adobe.solutions.acm.authoring.presentation.letter.data
com.adobe.solutions.acm.authoring.presentation.preview
com.adobe.solutions.acm.authoring.presentation.rte
com.adobe.solutions.acm.ccr.presentation
com.adobe.solutions.acm.ccr.presentation.contentcapture
com.adobe.solutions.acm.ccr.presentation.contentcapture.events
com.adobe.solutions.acm.ccr.presentation.contentcapture.preview
com.adobe.solutions.acm.ccr.presentation.datacapture
com.adobe.solutions.acm.ccr.presentation.datacapture.renderers
com.adobe.solutions.acm.ccr.presentation.pdf
com.adobe.solutions.exm
com.adobe.solutions.exm.authoring
com.adobe.solutions.exm.authoring.components.controls
com.adobe.solutions.exm.authoring.components.toolbars
com.adobe.solutions.exm.authoring.domain
com.adobe.solutions.exm.authoring.domain.expression
com.adobe.solutions.exm.authoring.domain.impl
com.adobe.solutions.exm.authoring.domain.method
com.adobe.solutions.exm.authoring.domain.variable
com.adobe.solutions.exm.authoring.enum
com.adobe.solutions.exm.authoring.events
com.adobe.solutions.exm.authoring.model
com.adobe.solutions.exm.authoring.renderer
com.adobe.solutions.exm.authoring.view
com.adobe.solutions.exm.expression
com.adobe.solutions.exm.impl
com.adobe.solutions.exm.impl.method
com.adobe.solutions.exm.method
com.adobe.solutions.exm.mock
com.adobe.solutions.exm.mock.method
com.adobe.solutions.exm.runtime
com.adobe.solutions.exm.runtime.impl
com.adobe.solutions.exm.variable
com.adobe.solutions.prm.constant
com.adobe.solutions.prm.domain
com.adobe.solutions.prm.domain.factory
com.adobe.solutions.prm.domain.impl
com.adobe.solutions.prm.domain.manager
com.adobe.solutions.prm.presentation.asset
com.adobe.solutions.prm.presentation.constant
com.adobe.solutions.prm.presentation.document
com.adobe.solutions.prm.presentation.event
com.adobe.solutions.prm.presentation.file
com.adobe.solutions.prm.presentation.project
com.adobe.solutions.prm.presentation.team
com.adobe.solutions.prm.presentation.util
com.adobe.solutions.prm.service
com.adobe.solutions.prm.services.impl
com.adobe.solutions.prm.vo
com.adobe.solutions.rca.constant
com.adobe.solutions.rca.domain
com.adobe.solutions.rca.domain.common
com.adobe.solutions.rca.domain.factory
com.adobe.solutions.rca.domain.impl
com.adobe.solutions.rca.domain.impl.manager
com.adobe.solutions.rca.domain.manager
com.adobe.solutions.rca.presentation
com.adobe.solutions.rca.presentation.comment
com.adobe.solutions.rca.presentation.constant
com.adobe.solutions.rca.presentation.event
com.adobe.solutions.rca.presentation.gantt
com.adobe.solutions.rca.presentation.gantt.ruler
com.adobe.solutions.rca.presentation.template
com.adobe.solutions.rca.presentation.template.audit
com.adobe.solutions.rca.presentation.template.definition
com.adobe.solutions.rca.presentation.template.documents
com.adobe.solutions.rca.presentation.template.stages
com.adobe.solutions.rca.presentation.util
com.adobe.solutions.rca.service
com.adobe.solutions.rca.services.impl
com.adobe.solutions.rca.vo
com.adobe.solutions.rca.vo.um
com.adobe.viewsource
fl.accessibility
fl.containers
fl.controls
fl.controls.dataGridClasses
fl.controls.listClasses
fl.controls.progressBarClasses
fl.core
fl.data
fl.display
fl.events
fl.ik
fl.lang
fl.livepreview
fl.managers
fl.motion
fl.motion.easing
fl.rsl
fl.text
fl.transitions
fl.transitions.easing
fl.video
flash.accessibility
flash.concurrent
flash.crypto
flash.data
flash.desktop
flash.display
flash.display3D
flash.display3D.textures
flash.errors
flash.events
flash.external
flash.filesystem
flash.filters
flash.geom
flash.globalization
flash.html
flash.media
flash.net
flash.net.dns
flash.net.drm
flash.notifications
flash.permissions
flash.printing
flash.profiler
flash.sampler
flash.security
flash.sensors
flash.system
flash.text
flash.text.engine
flash.text.ime
flash.ui
flash.utils
flash.xml
flashx.textLayout
flashx.textLayout.compose
flashx.textLayout.container
flashx.textLayout.conversion
flashx.textLayout.edit
flashx.textLayout.elements
flashx.textLayout.events
flashx.textLayout.factory
flashx.textLayout.formats
flashx.textLayout.operations
flashx.textLayout.utils
flashx.undo
ga.controls
ga.layouts
ga.model
ga.uiComponents
ga.util
ga.views
ga.wrappers
lc.foundation
lc.foundation.domain
lc.foundation.events
lc.foundation.ui
lc.foundation.util
lc.preloader
lc.procmgmt
lc.procmgmt.commands
lc.procmgmt.domain
lc.procmgmt.events
lc.procmgmt.formbridge
lc.procmgmt.impl
lc.procmgmt.ui.attachments
lc.procmgmt.ui.controls
lc.procmgmt.ui.controls.card
lc.procmgmt.ui.controls.renderer
lc.procmgmt.ui.help
lc.procmgmt.ui.layout
lc.procmgmt.ui.presentationmodel
lc.procmgmt.ui.process
lc.procmgmt.ui.search
lc.procmgmt.ui.startpoint
lc.procmgmt.ui.task
lc.procmgmt.ui.task.form
lc.procmgmt.ui.task.form.commands
lc.procmgmt.ui.tracking
mx.accessibility
mx.automation
mx.automation.air
mx.automation.delegates
mx.automation.delegates.advancedDataGrid
mx.automation.delegates.charts
mx.automation.delegates.containers
mx.automation.delegates.controls
mx.automation.delegates.controls.dataGridClasses
mx.automation.delegates.controls.fileSystemClasses
mx.automation.delegates.core
mx.automation.delegates.flashflexkit
mx.automation.events
mx.binding
mx.binding.utils
mx.charts
mx.charts.chartClasses
mx.charts.effects
mx.charts.effects.effectClasses
mx.charts.events
mx.charts.renderers
mx.charts.series
mx.charts.series.items
mx.charts.series.renderData
mx.charts.styles
mx.collections
mx.collections.errors
mx.containers
mx.containers.accordionClasses
mx.containers.dividedBoxClasses
mx.containers.errors
mx.containers.utilityClasses
mx.controls
mx.controls.advancedDataGridClasses
mx.controls.dataGridClasses
mx.controls.listClasses
mx.controls.menuClasses
mx.controls.olapDataGridClasses
mx.controls.scrollClasses
mx.controls.sliderClasses
mx.controls.textClasses
mx.controls.treeClasses
mx.controls.videoClasses
mx.core
mx.core.windowClasses
mx.data
mx.data.crypto
mx.data.errors
mx.data.events
mx.data.messages
mx.data.mxml
mx.data.offline.errors
mx.data.utils
mx.effects
mx.effects.easing
mx.effects.effectClasses
mx.events
mx.filters
mx.flash
mx.formatters
mx.geom
mx.graphics
mx.graphics.codec
mx.graphics.shaderClasses
mx.logging
mx.logging.errors
mx.logging.targets
mx.managers
mx.messaging
mx.messaging.channels
mx.messaging.config
mx.messaging.errors
mx.messaging.events
mx.messaging.management
mx.messaging.messages
mx.modules
mx.netmon
mx.olap
mx.olap.aggregators
mx.preloaders
mx.printing
mx.resources
mx.rpc
mx.rpc.events
mx.rpc.http
mx.rpc.http.mxml
mx.rpc.livecycle
mx.rpc.mxml
mx.rpc.remoting
mx.rpc.remoting.mxml
mx.rpc.soap
mx.rpc.soap.mxml
mx.rpc.wsdl
mx.rpc.xml
mx.skins
mx.skins.halo
mx.skins.spark
mx.skins.wireframe
mx.skins.wireframe.windowChrome
mx.states
mx.styles
mx.utils
mx.validators
org.osmf.containers
org.osmf.display
org.osmf.elements
org.osmf.events
org.osmf.layout
org.osmf.logging
org.osmf.media
org.osmf.metadata
org.osmf.net
org.osmf.net.dvr
org.osmf.net.httpstreaming
org.osmf.net.metrics
org.osmf.net.qos
org.osmf.net.rtmpstreaming
org.osmf.net.rules
org.osmf.traits
org.osmf.utils
spark.accessibility
spark.automation.delegates
spark.automation.delegates.components
spark.automation.delegates.components.gridClasses
spark.automation.delegates.components.mediaClasses
spark.automation.delegates.components.supportClasses
spark.automation.delegates.skins.spark
spark.automation.events
spark.collections
spark.components
spark.components.calendarClasses
spark.components.gridClasses
spark.components.mediaClasses
spark.components.supportClasses
spark.components.windowClasses
spark.core
spark.effects
spark.effects.animation
spark.effects.easing
spark.effects.interpolation
spark.effects.supportClasses
spark.events
spark.filters
spark.formatters
spark.formatters.supportClasses
spark.globalization
spark.globalization.supportClasses
spark.layouts
spark.layouts.supportClasses
spark.managers
spark.modules
spark.preloaders
spark.primitives
spark.primitives.supportClasses
spark.skins
spark.skins.mobile
spark.skins.mobile.supportClasses
spark.skins.spark
spark.skins.spark.mediaClasses.fullScreen
spark.skins.spark.mediaClasses.normal
spark.skins.spark.windowChrome
spark.skins.wireframe
spark.skins.wireframe.mediaClasses
spark.skins.wireframe.mediaClasses.fullScreen
spark.transitions
spark.utils
spark.validators
spark.validators.supportClasses
xd.core.axm.enterprise.view.components
xd.core.axm.enterprise.view.skins
xd.core.axm.view.components
xd.core.axm.view.components.support

Language Elements

Global Constants
Global Functions
Operators
Statements, Keywords & Directives
Special Types

Appendixes

What's New
Compiler Errors
Compiler Warnings
Run-Time Errors
Migrating to ActionScript 3
Supported Character Sets
MXML Only Tags
Motion XML Elements
Timed Text Tags
List of deprecated elements
Accessibility Implementation Constants
How to Use ActionScript Examples
Legal notices
Packagefl.containers
Classpublic class ScrollPane
InheritanceScrollPane Inheritance BaseScrollPane Inheritance UIComponent Inheritance Sprite Inheritance DisplayObjectContainer Inheritance InteractiveObject Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
Implements IFocusManagerComponent

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The ScrollPane component displays display objects and JPEG, GIF, and PNG files, as well as SWF files, in a scrollable area. You can use a scroll pane to limit the screen area that is occupied by these media types. The scroll pane can display content that is loaded from a local disk or from the Internet. You can set this content while authoring and, at run time, by using ActionScript. After the scroll pane has focus, if its content has valid tab stops, those markers receive focus. After the last tab stop in the content, focus moves to the next component. The vertical and horizontal scroll bars in the scroll pane do not receive focus.

Note: When content is being loaded from a different domain or sandbox, the properties of the content may be inaccessible for security reasons. For more information about how domain security affects the load process, see the ProLoader class.

Note: When loading very large image files into a ScrollPane object, it may be necessary to listen for the complete event and then resize the ScrollPane using the setSize() method. See the complete event example.

View the examples

Related API Elements



Public Properties
 PropertyDefined By
 InheritedaccessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation) for this InteractiveObject instance.
InteractiveObject
 InheritedaccessibilityProperties : AccessibilityProperties
The current accessibility options for this display object.
DisplayObject
 Inheritedalpha : Number
Indicates the alpha transparency value of the object specified.
DisplayObject
 InheritedblendMode : String
A value from the BlendMode class that specifies which blend mode to use.
DisplayObject
 InheritedblendShader : Shader
[write-only] Sets a shader that is used for blending the foreground and background.
DisplayObject
 InheritedbuttonMode : Boolean
Specifies the button mode of this sprite.
Sprite
  bytesLoaded : Number
[read-only] Gets the count of bytes of content that have been loaded.
ScrollPane
  bytesTotal : Number
[read-only] Gets the count of bytes of content to be loaded.
ScrollPane
 InheritedcacheAsBitmap : Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the display object.
DisplayObject
 Inherited    cacheAsBitmapMatrix : Matrix
If non-null, this Matrix object defines how a display object is rendered when cacheAsBitmap is set to true.
DisplayObject
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  content : DisplayObject
[read-only] Gets a reference to the content loaded into the scroll pane.
ScrollPane
 InheritedcontextMenu : NativeMenu
Specifies the context menu associated with this object.
InteractiveObject
 InheriteddoubleClickEnabled : Boolean
Specifies whether the object receives doubleClick events.
InteractiveObject
 InheriteddropTarget : DisplayObject
[read-only] Specifies the display object over which the sprite is being dragged, or on which the sprite was dropped.
Sprite
 Inheritedenabled : Boolean
Gets or sets a value that indicates whether the component can accept user interaction.
UIComponent
 Inheritedfilters : Array
An indexed array that contains each filter object currently associated with the display object.
DisplayObject
 InheritedfocusEnabled : Boolean
Gets or sets a Boolean value that indicates whether the component can receive focus after the user clicks it.
UIComponent
 InheritedfocusManager : IFocusManager
Gets or sets the FocusManager that controls focus for this component and its peers.
UIComponent
 InheritedfocusRect : Object
Specifies whether this object displays a focus rectangle.
InteractiveObject
 Inheritedgraphics : Graphics
[read-only] Specifies the Graphics object that belongs to this sprite where vector drawing commands can occur.
Sprite
 Inheritedheight : Number
[override] Gets or sets the height of the component, in pixels.
UIComponent
 InheritedhitArea : Sprite
Designates another sprite to serve as the hit area for a sprite.
Sprite
 InheritedhorizontalLineScrollSize : Number
Gets or sets a value that describes the amount of content to be scrolled, horizontally, when a scroll arrow is clicked.
BaseScrollPane
 InheritedhorizontalPageScrollSize : Number
Gets or sets the count of pixels by which to move the scroll thumb on the horizontal scroll bar when the scroll bar track is pressed.
BaseScrollPane
 InheritedhorizontalScrollBar : ScrollBar
[read-only] Gets a reference to the horizontal scroll bar.
BaseScrollPane
 InheritedhorizontalScrollPolicy : String
Gets or sets a value that indicates the state of the horizontal scroll bar.
BaseScrollPane
 InheritedhorizontalScrollPosition : Number
Gets or sets a value that describes the horizontal position of the horizontal scroll bar in the scroll pane, in pixels.
BaseScrollPane
 InheritedloaderInfo : LoaderInfo
[read-only] Returns a LoaderInfo object containing information about loading the file to which this display object belongs.
DisplayObject
 Inheritedmask : DisplayObject
The calling display object is masked by the specified mask object.
DisplayObject
 InheritedmaxHorizontalScrollPosition : Number
[read-only] Gets the maximum horizontal scroll position for the current content, in pixels.
BaseScrollPane
 InheritedmaxVerticalScrollPosition : Number
[read-only] Gets the maximum vertical scroll position for the current content, in pixels.
BaseScrollPane
 InheritedmetaData : Object
Obtains the meta data object of the DisplayObject instance if meta data was stored alongside the the instance of this DisplayObject in the SWF file through a PlaceObject4 tag.
DisplayObject
 InheritedmouseChildren : Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled.
DisplayObjectContainer
 InheritedmouseEnabled : Boolean
Specifies whether this object receives mouse, or other user input, messages.
InteractiveObject
 InheritedmouseFocusEnabled : Boolean
Gets or sets a value that indicates whether the component can receive focus after the user clicks it.
UIComponent
 InheritedmouseX : Number
[read-only] Indicates the x coordinate of the mouse or user input device position, in pixels.
DisplayObject
 InheritedmouseY : Number
[read-only] Indicates the y coordinate of the mouse or user input device position, in pixels.
DisplayObject
 Inheritedname : String
Indicates the instance name of the DisplayObject.
DisplayObject
 InheritedneedsSoftKeyboard : Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display when this InteractiveObject instance receives focus.
InteractiveObject
 InheritednumChildren : int
[read-only] Returns the number of children of this object.
DisplayObjectContainer
 InheritedopaqueBackground : Object
Specifies whether the display object is opaque with a certain background color.
DisplayObject
 Inheritedparent : DisplayObjectContainer
[read-only] Indicates the DisplayObjectContainer object that contains this display object.
DisplayObject
  percentLoaded : Number
[read-only] Gets a number between 0 and 100 indicating what percentage of the content is loaded.
ScrollPane
 Inheritedroot : DisplayObject
[read-only] For a display object in a loaded SWF file, the root property is the top-most display object in the portion of the display list's tree structure represented by that SWF file.
DisplayObject
 Inheritedrotation : Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation.
DisplayObject
 InheritedrotationX : Number
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 InheritedrotationY : Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 InheritedrotationZ : Number
Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container.
DisplayObject
 Inheritedscale9Grid : Rectangle
The current scaling grid that is in effect.
DisplayObject
 InheritedscaleX : Number
[override] Multiplies the current width of the component by a scale factor.
UIComponent
 InheritedscaleY : Number
[override] Multiplies the current height of the component by a scale factor.
UIComponent
 InheritedscaleZ : Number
Indicates the depth scale (percentage) of an object as applied from the registration point of the object.
DisplayObject
  scrollDrag : Boolean
Gets or sets a value that indicates whether scrolling occurs when a user drags on content within the scroll pane.
ScrollPane
 InheritedscrollRect : Rectangle
The scroll rectangle bounds of the display object.
DisplayObject
 Inherited    softKeyboard : String
Controls the appearance of the soft keyboard.
InteractiveObject
 InheritedsoftKeyboardInputAreaOfInterest : Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed (not available on iOS).
InteractiveObject
 InheritedsoundTransform : flash.media:SoundTransform
Controls sound within this sprite.
Sprite
  source : Object
Gets or sets an absolute or relative URL that identifies the location of the SWF or image file to load, the class name of a movie clip in the library, a reference to a display object, or a instance name of a movie clip on the same level as the component.
ScrollPane
 Inheritedstage : Stage
[read-only] The Stage of the display object.
DisplayObject
 InheritedtabChildren : Boolean
Determines whether the children of the object are tab enabled.
DisplayObjectContainer
 InheritedtabEnabled : Boolean
Specifies whether this object is in the tab order.
InteractiveObject
 InheritedtabIndex : int
Specifies the tab ordering of objects in a SWF file.
InteractiveObject
 InheritedtextSnapshot : flash.text:TextSnapshot
[read-only] Returns a TextSnapshot object for this DisplayObjectContainer instance.
DisplayObjectContainer
 Inheritedtransform : flash.geom:Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds.
DisplayObject
 InheriteduseBitmapScrolling : Boolean
When set to true, the cacheAsBitmap property for the scrolling content is set to true; when set to false this value is turned off.
BaseScrollPane
 InheriteduseHandCursor : Boolean
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls over a sprite in which the buttonMode property is set to true.
Sprite
 InheritedverticalLineScrollSize : Number
Gets or sets a value that describes how many pixels to scroll vertically when a scroll arrow is clicked.
BaseScrollPane
 InheritedverticalPageScrollSize : Number
Gets or sets the count of pixels by which to move the scroll thumb on the vertical scroll bar when the scroll bar track is pressed.
BaseScrollPane
 InheritedverticalScrollBar : ScrollBar
[read-only] Gets a reference to the vertical scroll bar.
BaseScrollPane
 InheritedverticalScrollPolicy : String
Gets or sets a value that indicates the state of the vertical scroll bar.
BaseScrollPane
 InheritedverticalScrollPosition : Number
Gets or sets a value that describes the vertical position of the vertical scroll bar in the scroll pane, in pixels.
BaseScrollPane
 Inheritedvisible : Boolean
[override] Gets or sets a value that indicates whether the current component instance is visible.
UIComponent
 Inheritedwidth : Number
[override] Gets or sets the width of the component, in pixels.
UIComponent
 Inheritedx : Number
[override] Gets or sets the x coordinate that represents the position of the component along the x axis within its parent container.
UIComponent
 Inheritedy : Number
[override] Gets or sets the y coordinate that represents the position of the component along the y axis within its parent container.
UIComponent
 Inheritedz : Number
Indicates the z coordinate position along the z-axis of the DisplayObject instance relative to the 3D parent container.
DisplayObject
Public Methods
 MethodDefined By
  
Creates a new ScrollPane component instance.
ScrollPane
 Inherited
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
Adds a child DisplayObject instance to this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
EventDispatcher
 Inherited
Indicates whether the security restrictions would cause any display objects to be omitted from the list returned by calling the DisplayObjectContainer.getObjectsUnderPoint() method with the specified point point.
DisplayObjectContainer
 Inherited
Deletes a style property from this component instance.
UIComponent
 Inherited
Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.
DisplayObjectContainer
 Inherited
Dispatches an event into the event flow.
EventDispatcher
 Inherited
Shows or hides the focus indicator on this component.
UIComponent
 Inherited
Initiates an immediate draw operation, without invalidating everything as invalidateNow does.
UIComponent
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object.
DisplayObject
 Inherited
Returns the child display object instance that exists at the specified index.
DisplayObjectContainer
 Inherited
Returns the child display object that exists with the specified name.
DisplayObjectContainer
 Inherited
Returns the index position of a child DisplayObject instance.
DisplayObjectContainer
 Inherited
Retrieves the object that currently has focus.
UIComponent
 Inherited
Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
Returns a rectangle that defines the boundary of the display object, based on the coordinate system defined by the targetCoordinateSpace parameter, excluding any strokes on shapes.
DisplayObject
 Inherited
Retrieves a style property that is set in the style lookup chain of the component.
UIComponent
  
[static] Retrieves the default style map for the current component.
ScrollPane
 Inherited
Converts the point object from the Stage (global) coordinates to the display object's (local) coordinates.
DisplayObject
 Inherited
Converts a two-dimensional point from the Stage (global) coordinates to a three-dimensional display object's (local) coordinates.
DisplayObject
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
EventDispatcher
 Inherited
Indicates whether an object has a specified property defined.
Object
 Inherited
Evaluates the bounding box of the display object to see if it overlaps or intersects with the bounding box of the obj display object.
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
Evaluates the display object to see if it overlaps or intersects with the point specified by the x and y parameters.
DisplayObject
 Inherited
invalidate(property:String, callLater:Boolean = true):void
Marks a property as invalid and redraws the component on the next frame unless otherwise specified.
UIComponent
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
load(request:URLRequest, context:LoaderContext = null):void
The request parameter of this method accepts only a URLRequest object whose source property contains a string, a class, or a URLRequest object.
ScrollPane
 Inherited
Converts a three-dimensional point of the three-dimensional display object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates.
DisplayObject
 Inherited
Converts the point object from the display object's (local) coordinates to the Stage (global) coordinates.
DisplayObject
 Inherited
[static] Merges the styles from multiple classes into one object.
UIComponent
 Inherited
Moves the component to the specified position within its parent.
UIComponent
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
Reloads the contents of the scroll pane.
ScrollPane
 Inherited
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
Removes a child DisplayObject from the specified index position in the child list of the DisplayObjectContainer.
DisplayObjectContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void
Removes all child DisplayObject instances from the child list of the DisplayObjectContainer instance.
DisplayObjectContainer
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
EventDispatcher
 Inherited
Raises a virtual keyboard.
InteractiveObject
 Inherited
Changes the position of an existing child in the display object container.
DisplayObjectContainer
 Inherited
Sets the focus to this component.
UIComponent
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
 Inherited
setSize(width:Number, height:Number):void
Sets the component to the specified width and height.
UIComponent
 Inherited
setStyle(style:String, value:Object):void
Sets a style property on this component instance.
UIComponent
 Inherited
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
Lets the user drag the specified sprite.
Sprite
 Inherited
startTouchDrag(touchPointID:int, lockCenter:Boolean = false, bounds:Rectangle = null):void
Lets the user drag the specified sprite on a touch-enabled device.
Sprite
 Inherited
Recursively stops the timeline execution of all MovieClips rooted at this object.
DisplayObjectContainer
 Inherited
Ends the startDrag() method.
Sprite
 Inherited
stopTouchDrag(touchPointID:int):void
Ends the startTouchDrag() method, for use with touch-enabled devices.
Sprite
 Inherited
Swaps the z-order (front-to-back order) of the two specified child objects.
DisplayObjectContainer
 Inherited
swapChildrenAt(index1:int, index2:int):void
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the child list.
DisplayObjectContainer
 Inherited
Returns the string representation of this object, formatted according to locale-specific conventions.
Object
 Inherited
Returns the string representation of the specified object.
Object
  
Refreshes the scroll bar properties based on the width and height of the content.
ScrollPane
 Inherited
Validates and updates the properties and layout of this object, redrawing it if necessary.
UIComponent
 Inherited
Returns the primitive value of the specified object.
Object
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
EventDispatcher
Protected Methods
 MethodDefined By
 Inherited
Returns the specified style for a component, considering all styles set on the global level, component level and instance level.
UIComponent
Events
 Event Summary Defined By
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active.EventDispatcher
 InheritedDispatched when a display object is added to the display list.DisplayObject
 InheritedDispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained.DisplayObject
 InheritedDispatched when the user selects 'Clear' (or 'Delete') from the text context menu.InteractiveObject
 InheritedDispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject.InteractiveObject
  Dispatched when content has finished loading.ScrollPane
 Inherited
    contextMenu
Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application.InteractiveObject
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu.InteractiveObject
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu.InteractiveObject
 Inherited[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive.EventDispatcher
 InheritedDispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true.InteractiveObject
 Inherited[broadcast event] Dispatched when the playhead is entering a new frame.DisplayObject
 Inherited[broadcast event] Dispatched when the playhead is exiting the current frame.DisplayObject
 InheritedDispatched after a display object gains focus.InteractiveObject
 InheritedDispatched after a display object loses focus.InteractiveObject
 Inherited[broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run.DisplayObject
 InheritedDispatched when the user creates a point of contact along the edge of the touch surface with an InteractiveObject instance, (such as tapping along the edge of the touch surface on Siri Remote for Apple TV) Some devices might also interpret this contact as a combination of several touch events, as well.InteractiveObject
 InheritedDispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched after the component visibility changes from visible to invisible.UIComponent
 InheritedThis event is dispatched to any client app that supports inline input with an IMEInteractiveObject
  Dispatched when the properties and methods of a loaded SWF file are accessible.ScrollPane
  Dispatched after an input or output error occurs.ScrollPane
 InheritedDispatched when the user presses a key.InteractiveObject
 InheritedDispatched when the user attempts to change focus by using keyboard navigation.InteractiveObject
 InheritedDispatched when the user releases a key.InteractiveObject
 InheritedDispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject.InteractiveObject
 InheritedDispatched when a user presses the middle pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user presses the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user attempts to change focus by using a pointer device.InteractiveObject
 InheritedDispatched when a user moves the pointing device while it is over an InteractiveObject.InteractiveObject
 InheritedDispatched when the user moves a pointing device away from an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a mouse wheel is spun over an InteractiveObject instance.InteractiveObject
 InheritedDispatched after the component is moved.UIComponent
 InheritedDispatched by the drag initiator InteractiveObject when the user releases the drag gesture.InteractiveObject
 InheritedDispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop().InteractiveObject
 InheritedDispatched by an InteractiveObject when a drag gesture enters its boundary.InteractiveObject
 InheritedDispatched by an InteractiveObject when a drag gesture leaves its boundary.InteractiveObject
 InheritedDispatched by an InteractiveObject continually while a drag gesture remains within its boundary.InteractiveObject
 InheritedDispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.InteractiveObject
 InheritedDispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call.InteractiveObject
  Dispatched after a network operation starts.ScrollPane
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu.InteractiveObject
  Dispatched while content is loading.ScrollPane
 InheritedDispatched when the user lowers an active stylus past the proximity detection threshold of the screen.InteractiveObject
 Inherited
    proximityEnd
Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold.InteractiveObject
 Inherited
    proximityOut
Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen.InteractiveObject
 InheritedDispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen).InteractiveObject
 InheritedDispatched when a user releases the button on the pointing device after the user first pressed the button over an InteractiveObject instance and then moved the pointing device off of the InteractiveObject instance.InteractiveObject
 InheritedDispatched when a display object is about to be removed from the display list.DisplayObject
 InheritedDispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained.DisplayObject
 Inherited[broadcast event] Dispatched when the display list is about to be updated and rendered.DisplayObject
 InheritedDispatched after the component is resized.UIComponent
 InheritedDispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject.InteractiveObject
 InheritedDispatched when a user presses the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when a user releases the pointing device button over an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device away from an InteractiveObject instance.InteractiveObject
 InheritedDispatched when the user moves a pointing device over an InteractiveObject instance.InteractiveObject
   Defines the value of the type property of a scroll event object.ScrollPane
  Dispatched after a security error occurs while content is loading.ScrollPane
 InheritedDispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu.InteractiveObject
 InheritedDispatched after the component visibility changes from invisible to visible.UIComponent
 InheritedDispatched immediately after the soft keyboard is raised.InteractiveObject
 InheritedDispatched immediately before the soft keyboard is raised.InteractiveObject
 InheritedDispatched immediately after the soft keyboard is lowered.InteractiveObject
 InheritedDispatched when the value of the object's tabChildren flag changes.InteractiveObject
 InheritedDispatched when the object's tabEnabled flag changes.InteractiveObject
 InheritedDispatched when the value of the object's tabIndex property changes.InteractiveObject
 InheritedDispatched when a user enters one or more characters of text.InteractiveObject
 InheritedDispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user touches the device, and is continuously dispatched until the point of contact is removed.InteractiveObject
 InheritedDispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
 InheritedDispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen).InteractiveObject
Styles

Styles are either common or associated with a specific theme. If the style is common, it can be used with any theme. If a style is associated with a specific theme, it can only be used if your application uses that theme.

Common Styles
 Style Description Defined By
  
contentPadding
Type: Number Format: Length
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The amount of padding to put around the content in the scroll pane, in pixels. The default value is 0.
ScrollPane
 InheritedType: Number Format: Length
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

When the enabled property is set to false, interaction with the component is prevented and a white overlay is displayed over the component, dimming the component contents.
BaseScrollPane
  
disabledSkin
Type: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin that shows when the scroll pane is disabled. The default value is ScrollPane_disabledSkin.
ScrollPane
 InheritedType: flash.text.TextFormat
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The TextFormat object to use to render the component label when the button is disabled.
UIComponent
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the down arrow button of the scroll bar when it is disabled.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the down arrow button of the scroll bar when you click the arrow button.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the down arrow button of the scroll bar when the mouse pointer is over the arrow button.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the down arrow button of the scroll bar.
BaseScrollPane
 InheritedType: Number Format: Length
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The padding that separates the outside boundaries of the component from the outside edges of the focus indicator, in pixels.
UIComponent
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin to be used to display focus indicators.
UIComponent
 InheritedType: Number Format: Time
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The number of milliseconds to wait after the buttonDown event is first dispatched before sending a second buttonDown event.
BaseScrollPane
 InheritedType: Number Format: Time
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The interval, in milliseconds, between buttonDown events that are dispatched after the delay that is specified by the repeatDelay style.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin to be used as the background of the scroll pane.
BaseScrollPane
 InheritedType: flash.text.TextFormat
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The TextFormat object to use to render the component label.
UIComponent
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin that is used to indicate the disabled state of the thumb.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the thumb of the scroll bar when you click the thumb.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the icon for the thumb of the scroll bar.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the thumb of the scroll bar when the mouse pointer is over the thumb.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin used for the thumb of the scroll bar.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin that is used to indicate a disabled track.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin that is used to indicate the down state of a disabled skin.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin that is used to indicate the mouseover state for the scroll track.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The skin used to indicate the mouse up state for the scroll track.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the up arrow button of the scroll bar when it is disabled.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the up arrow button of the scroll bar when you click the arrow button.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the up arrow button of the scroll bar when the mouse pointer is over the arrow button.
BaseScrollPane
 InheritedType: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

Name of the class to use as the skin for the up arrow button of the scroll bar.
BaseScrollPane
  
upSkin
Type: Class
Language Version: ActionScript 3.0  Product Version: Flash CS3  Runtime Versions: Flash9.0.28.0, AIR 1.0

The default skin shown on the scroll pane. The default value is ScrollPane_upSkin.
ScrollPane
Public Constants
 ConstantDefined By
 Inheritedversion : String = "3.0.3.1"
The version number of the components.
UIComponent
Property Detail

bytesLoaded

property
bytesLoaded:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets the count of bytes of content that have been loaded. When this property equals the value of bytesTotal, all the bytes are loaded.

The default value is 0.



Implementation
    public function get bytesLoaded():Number

Related API Elements


Example  ( How to use this example )
The following example creates a scroll pane and loads "test.jpg" into it. As the load progresses, the Output panel displays the bytes loaded and bytes total and a progress bar provides a visual representation. Replace "test.jpg" with an image and place both ScrollPane and ProgressBar in the library of the FLA file:
import fl.containers.ScrollPane;
import fl.controls.ProgressBar;

var path:String = "test.jpg";

var sp:ScrollPane = new ScrollPane();
sp.move(10,10);
sp.setSize(530,300);
sp.addEventListener(ProgressEvent.PROGRESS,reportProgress);
sp.load(new URLRequest(path));
addChild(sp);

var progressBar:ProgressBar = new ProgressBar();
progressBar.move(10,320);
progressBar.setSize(530,50);
progressBar.source = sp;
addChild(progressBar);

function reportProgress(e:ProgressEvent):void {
    trace(e.bytesLoaded + " loaded out of " + e.bytesTotal);
}

bytesTotal

property 
bytesTotal:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets the count of bytes of content to be loaded.

The default value is 0.



Implementation
    public function get bytesTotal():Number

Related API Elements


Example  ( How to use this example )
The following example loads an external image into a ScrollPane instance and displays the bytesLoaded, bytesTotal and percentLoaded properties by listening for the progress and complete events:
import fl.containers.ScrollPane;

var url:String = "http://www.helpexamples.com/flash/images/image1.jpg";

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
myScrollPane.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
myScrollPane.load(new URLRequest(url));
addChild(myScrollPane);

function progressHandler(event:ProgressEvent):void {
    var bLoaded:int = event.bytesLoaded;
    var bTotal:int = event.bytesTotal;
    var pctLoaded:int = int(event.currentTarget.percentLoaded);
    trace("progress: " + bLoaded + " of " + bTotal + " bytes loaded (" + pctLoaded + "%)");
}

function completeHandler(event:Event):void {
    trace("complete:");
}

content

property 
content:DisplayObject  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets a reference to the content loaded into the scroll pane.

The default value is null.



Implementation
    public function get content():DisplayObject

Example  ( How to use this example )
The following example demonstrates how to modify the transparency of the content of a scroll pane:
import fl.containers.ScrollPane;
import fl.controls.NumericStepper;

var ns:NumericStepper = new NumericStepper();
ns.minimum = 10;
ns.maximum = 100;
ns.stepSize = 10;
ns.value = ns.maximum;
ns.addEventListener(Event.CHANGE, updateScrollPaneContentAlpha);
addChild(ns);

var sp:ScrollPane = new ScrollPane();
sp.move(0,30);
sp.setSize(180, 160);
sp.source = "http://www.helpexamples.com/flash/images/image2.jpg";
addChild(sp);

function updateScrollPaneContentAlpha(e:Event):void {
    sp.content.alpha = e.target.value / 100;
}
The following example uses two Button component instances to control how much an image appears zoomed in a ScrollPane component:
import fl.containers.ScrollPane;
import fl.controls.Button;
import fl.events.ComponentEvent;

var MAX_SCROLLPANE_WIDTH:uint = 400;
var MAX_SCROLLPANE_HEIGHT:uint = 267;

var url:String = "http://www.helpexamples.com/flash/images/image1.jpg";

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.scrollDrag = true;
myScrollPane.cacheAsBitmap = true;
myScrollPane.setSize(MAX_SCROLLPANE_WIDTH, MAX_SCROLLPANE_HEIGHT);
myScrollPane.move(10, 10);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
myScrollPane.load(new URLRequest(url));
addChild(myScrollPane);

var zoomInButton:Button = new Button();
zoomInButton.autoRepeat = true;
zoomInButton.enabled = false;
zoomInButton.label = "Zoom in (+)";
zoomInButton.move(420, 10);
zoomInButton.addEventListener(ComponentEvent.BUTTON_DOWN, zoomInHandler);
addChild(zoomInButton);

var zoomOutButton:Button = new Button();
zoomOutButton.autoRepeat = true;
zoomOutButton.enabled = false;
zoomOutButton.label = "Zoom out (-)";
zoomOutButton.move(420, 40);
zoomOutButton.addEventListener(ComponentEvent.BUTTON_DOWN, zoomOutHandler);
addChild(zoomOutButton);

var cacheButton:Button = new Button();
cacheButton.enabled = false;
cacheButton.emphasized = myScrollPane.cacheAsBitmap;
cacheButton.label = "cacheAsBitmap";
cacheButton.toggle = true;
cacheButton.selected = myScrollPane.cacheAsBitmap;
cacheButton.move(420, 70);
cacheButton.addEventListener(Event.CHANGE, changeHandler);
addChild(cacheButton);

function completeHandler(event:Event):void {
    zoomInButton.enabled = true;
    zoomOutButton.enabled = true;
    cacheButton.enabled = true;
    myScrollPane.removeEventListener(Event.COMPLETE, completeHandler);
}

function changeHandler(event:Event):void {
    myScrollPane.cacheAsBitmap = !myScrollPane.cacheAsBitmap;
    cacheButton.emphasized = myScrollPane.cacheAsBitmap;
}

function zoomInHandler(event:ComponentEvent):void {
    var zoomLvl:Number = myScrollPane.content.scaleX * 1.1;
    updateSP(zoomLvl);
}

function zoomOutHandler(event:ComponentEvent):void {
    var zoomLvl:Number = myScrollPane.content.scaleX / 1.1;
    updateSP(zoomLvl);
}

function updateSP(newScale:Number):void {
    var img:DisplayObject = myScrollPane.content as DisplayObject;
    img.scaleY = newScale;
    img.scaleX = newScale;
    myScrollPane.width = Math.min(img.width, MAX_SCROLLPANE_WIDTH);
    myScrollPane.height = Math.min(img.height, MAX_SCROLLPANE_HEIGHT);
    myScrollPane.update();
}

percentLoaded

property 
percentLoaded:Number  [read-only]

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets a number between 0 and 100 indicating what percentage of the content is loaded. If you are loading assets from your library, and not externally loaded content, the percentLoaded property is set to 0.

The default value is 0.



Implementation
    public function get percentLoaded():Number

Related API Elements


Example  ( How to use this example )
The following example loads an external image into a ScrollPane instance and displays the bytesLoaded, bytesTotal and percentLoaded properties by listening for the progress and complete events:
import fl.containers.ScrollPane;

var url:String = "http://www.helpexamples.com/flash/images/image1.jpg";

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
myScrollPane.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
myScrollPane.load(new URLRequest(url));
addChild(myScrollPane);

function progressHandler(event:ProgressEvent):void {
    var bLoaded:int = event.bytesLoaded;
    var bTotal:int = event.bytesTotal;
    var pctLoaded:int = int(event.currentTarget.percentLoaded);
    trace("progress: " + bLoaded + " of " + bTotal + " bytes loaded (" + pctLoaded + "%)");
}

function completeHandler(event:Event):void {
    trace("complete:");
}

scrollDrag

property 
scrollDrag:Boolean

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets or sets a value that indicates whether scrolling occurs when a user drags on content within the scroll pane. A value of true indicates that scrolling occurs when a user drags on the content; a value of false indicates that it does not.

The default value is false.



Implementation
    public function get scrollDrag():Boolean
    public function set scrollDrag(value:Boolean):void

Related API Elements


Example  ( How to use this example )
The following example creates a ScrollPane instance and traces the component's horizontal and vertical scroll position when the content is scrolled:
import fl.containers.ScrollPane;
import fl.events.ScrollEvent;

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.scrollDrag = true;
myScrollPane.source = "http://www.helpexamples.com/flash/images/image2.jpg";
myScrollPane.addEventListener(ScrollEvent.SCROLL, scrollHandler);
myScrollPane.move(10, 10);
addChild(myScrollPane);

function scrollHandler(event:ScrollEvent):void {
    var mySP:ScrollPane = event.currentTarget as ScrollPane;
    trace("scrolling");
    trace("\t" + "direction:", event.direction);
    trace("\t" + "position:", event.position);
    trace("\t" + "horizontalScrollPosition:", mySP.horizontalScrollPosition, "of", mySP.maxHorizontalScrollPosition);
    trace("\t" + "verticalScrollPosition:", mySP.verticalScrollPosition, "of", mySP.maxVerticalScrollPosition);
}

source

property 
source:Object

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Gets or sets an absolute or relative URL that identifies the location of the SWF or image file to load, the class name of a movie clip in the library, a reference to a display object, or a instance name of a movie clip on the same level as the component.

Valid image file formats include GIF, PNG, and JPEG. To load an asset by using a URLRequest object, use the load() method.

The default value is null.



Implementation
    public function get source():Object
    public function set source(value:Object):void

Related API Elements


Example  ( How to use this example )
The following example loads an external image into a ScrollPane component using the source property:
import fl.containers.ScrollPane;

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.source = "http://www.helpexamples.com/flash/images/image1.jpg";
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
addChild(myScrollPane);
The following example loads a movie clip symbol from the library into a ScrollPane component using the source property:
import fl.containers.ScrollPane;

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.source = Box;
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
addChild(myScrollPane);
Constructor Detail

ScrollPane

()Constructor
public function ScrollPane()

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Creates a new ScrollPane component instance.

Method Detail

getStyleDefinition

()method
public static function getStyleDefinition():Object

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Retrieves the default style map for the current component. The style map contains the type that is appropriate for the component, depending on the style that the component uses. For example, the disabledTextFormat style contains a value of null or a TextFormat object. You can use these styles and call setStyle() on the current component. The following code overrides the default disabledTextFormat style on the specified component:

componentInstance.setStyle("disabledTextFormat", new TextFormat());

Returns
Object — Default styles object.

Related API Elements


Example  ( How to use this example )

The following example creates a style browser for several component classes:
import fl.controls.*;
import fl.containers.*;
import fl.controls.listClasses.*;
import fl.controls.dataGridClasses.*;
import fl.controls.progressBarClasses.*;
import fl.core.UIComponent;
import fl.data.DataProvider;

var dp:DataProvider = new DataProvider();
dp.addItem( { label: "BaseScrollPane",    data:BaseScrollPane } );
dp.addItem( { label: "Button",             data:Button } );
dp.addItem( { label: "CellRenderer",    data:CellRenderer } );
dp.addItem( { label: "CheckBox",         data:CheckBox } );
dp.addItem( { label: "ColorPicker",     data:ColorPicker } );
dp.addItem( { label: "ComboBox",         data:ComboBox } );
dp.addItem( { label: "DataGrid",         data:DataGrid } );
dp.addItem( { label: "HeaderRenderer",    data:HeaderRenderer } );
dp.addItem( { label: "ImageCell",        data:ImageCell } );
dp.addItem( { label: "IndeterminateBar",data:IndeterminateBar } );
dp.addItem( { label: "Label",             data:Label } );
dp.addItem( { label: "List",             data:List } );
dp.addItem( { label: "NumericStepper",     data:NumericStepper } );
dp.addItem( { label: "ProgressBar",     data:ProgressBar } );
dp.addItem( { label: "RadioButton",     data:RadioButton } );
dp.addItem( { label: "ScrollPane",         data:ScrollPane } );
dp.addItem( { label: "Slider",             data:Slider } );
dp.addItem( { label: "TextArea",         data:TextArea } );
dp.addItem( { label: "TextInput",         data:TextInput } );
dp.addItem( { label: "TileList",         data:TileList } );
dp.addItem( { label: "UILoader",         data:UILoader } );
dp.addItem( { label: "UIComponent",     data:UIComponent } );

var cb:ComboBox = new ComboBox();
cb.move(10,10);
cb.setSize(300,25);
cb.prompt = "Select a component to view its styles";
cb.rowCount = 12;
cb.dataProvider = dp;
cb.addEventListener(Event.CHANGE, showStyleDefinition);
addChild(cb);

var dg:DataGrid = new DataGrid();
dg.setSize(425,300);
dg.move(10,50);
dg.columns = [ new DataGridColumn("StyleName"), new DataGridColumn("DefaultValue") ];
addChild(dg);

function showStyleDefinition(e:Event):void {
    var componentClass:Class = e.target.selectedItem.data as Class;
    var styles:Object = componentClass["getStyleDefinition"].call(this);
    trace(styles.toString());
    var styleData:DataProvider = new DataProvider();
    for(var i:* in styles) {
        trace(i + " : " + styles[i]);
        styleData.addItem( { StyleName:i, DefaultValue:styles[i] } );
    }
    styleData.sortOn("StyleName");
    dg.dataProvider = styleData;
}

load

()method 
public function load(request:URLRequest, context:LoaderContext = null):void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

The request parameter of this method accepts only a URLRequest object whose source property contains a string, a class, or a URLRequest object. By default, the LoaderContext object uses the current domain as the application domain. To specify a different application domain value, to check a policy file, or to change the security domain, initialize a new LoaderContext object and pass it to this method.

Parameters

request:URLRequest — The URLRequest object to use to load an image into the scroll pane.
 
context:LoaderContext (default = null) — The LoaderContext object that sets the context of the load operation.

Related API Elements


Example  ( How to use this example )

The following example loads an image into a scroll pane:
import fl.containers.ScrollPane;

var request:URLRequest = new URLRequest("http://www.helpexamples.com/flash/images/image1.jpg");
var sp:ScrollPane = new ScrollPane();
sp.setSize(180, 160);
sp.load(request);
addChild(sp);

refreshPane

()method 
public function refreshPane():void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Reloads the contents of the scroll pane.

This method does not redraw the scroll bar. To reset the scroll bar, use the update() method.

Related API Elements


Example  ( How to use this example )

The following example loads an image into a ScrollPane component instance and refreshes the pane using the refreshPane() method:
import fl.containers.ScrollPane;
import fl.controls.Button;
import fl.controls.TextArea;

var url:String = "http://www.helpexamples.com/flash/images/image2.jpg";

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
myScrollPane.load(new URLRequest(url));
myScrollPane.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
addChild(myScrollPane);

var refreshButton:Button = new Button();
refreshButton.emphasized = true;
refreshButton.label = "refreshPane()";
refreshButton.move(myScrollPane.x + myScrollPane.width + 10, myScrollPane.y);
refreshButton.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(refreshButton);

var myTextArea:TextArea = new TextArea();
myTextArea.editable = false;
myTextArea.setSize(320, 120);
myTextArea.move(myScrollPane.x, myScrollPane.y + myScrollPane.height + 10);
addChild(myTextArea);

function progressHandler(event:ProgressEvent):void {
    var bLoaded:int = event.bytesLoaded;
    var bTotal:int = event.bytesTotal;
    var pctLoaded:int = int(event.currentTarget.percentLoaded);
    addText("progress (" + bLoaded + " of " + bTotal + " bytes loaded -- " + pctLoaded + "%)");
}

function completeHandler(event:Event):void {
    addText("complete");
    addText("----------");
}

function clickHandler(event:MouseEvent):void {
    myScrollPane.refreshPane();
}

function addText(str:String):void {
    myTextArea.appendText(str + "\n");
    myTextArea.verticalScrollPosition = myTextArea.maxVerticalScrollPosition;
}

update

()method 
public function update():void

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Refreshes the scroll bar properties based on the width and height of the content. This is useful if the content of the ScrollPane changes during run time.

Related API Elements


Example  ( How to use this example )

The following example creates a ScrollPane component instance and loads different images based on which buttons a user clicks:
import fl.containers.ScrollPane;
import fl.controls.Button;

var baseURL:String = "http://www.helpexamples.com/flash/images/";

var img1Button:Button = new Button();
img1Button.label = "Image 1";
img1Button.move(10, 10);
img1Button.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(img1Button);

var img2Button:Button = new Button();
img2Button.label = "Image 2";
img2Button.move(10, 40);
img2Button.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(img2Button);

var img3Button:Button = new Button();
img3Button.label = "Image 3";
img3Button.move(10, 70);
img3Button.addEventListener(MouseEvent.CLICK, clickHandler);
addChild(img3Button);

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize(320, 240);
myScrollPane.move(120, 10);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
addChild(myScrollPane);

function clickHandler(event:MouseEvent):void {
    switch (event.currentTarget) {
        case img1Button:
            myScrollPane.source = baseURL + "image1.jpg";
            break;
        case img2Button:
            myScrollPane.source = baseURL + "image2.jpg";
            break;
        case img3Button:
            myScrollPane.source = baseURL + "image3.jpg";
            break;
    }
}

function completeHandler(event:Event):void {
    myScrollPane.update();
}
Event Detail

complete

Event
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.COMPLETE

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched when content has finished loading.

The Event.COMPLETE constant defines the value of the type property of a complete event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has completed loading.

Example  ( How to use this example )

The following example creates a ScrollPane component instance, loads an external image, and listens for the progress and complete events. Once the image load is complete, the ScrollPane is resized (using the setSize() method), centered on the stage, and added to the display list.
import fl.containers.ScrollPane;
import fl.controls.Label;

var url:String = "http://www.helpexamples.com/flash/images/image1.jpg";

var conversion:Number = 1024;

var myLabel:Label = new Label();
myLabel.autoSize = TextFieldAutoSize.LEFT;
myLabel.text = "";
myLabel.move(10, 10);
addChild(myLabel);

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
myScrollPane.load(new URLRequest(url));

function progressHandler(event:ProgressEvent):void {
    var bLoaded:int = int(event.bytesLoaded / conversion);
    var bTotal:int = int(event.bytesTotal / conversion);
    var pctLoaded:int = event.target.percentLoaded as int;
    myLabel.text = bLoaded + " of " + bTotal + " (" + pctLoaded + "%)";
}

function completeHandler(event:Event):void {
    var img:DisplayObject = myScrollPane.content;
    
    myScrollPane.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
    myScrollPane.removeEventListener(Event.COMPLETE, completeHandler);
    removeChild(myLabel);

    myScrollPane.setSize(img.width, img.height);
    var newX:uint = (stage.stageWidth - myScrollPane.width) / 2;
    var newY:uint = (stage.stageHeight - myScrollPane.height) / 2;
    myScrollPane.move(newX, newY);
    addChild(myScrollPane);
}

Related API Elements

init

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.INIT

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched when the properties and methods of a loaded SWF file are accessible. The following conditions must exist for this event to be dispatched:

  • All the properties and methods that are associated with the loaded object, as well as those that are associated with the component, must be accessible.
  • The constructors for all child objects must have completed.

The Event.INIT constant defines the value of the type property of an init event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe LoaderInfo object associated with the SWF file being loaded.

ioError

Event  
Event Object Type: flash.events.IOErrorEvent
property IOErrorEvent.type = flash.events.IOErrorEvent.IO_ERROR

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched after an input or output error occurs.

Defines the value of the type property of an ioError event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
errorIDA reference number associated with the specific error (AIR only).
targetThe network object experiencing the input/output error.
textText to be displayed as an error message.

Example  ( How to use this example )

The following example creates a UILoader component instance and attempts to load a nonexistent file, which causes the ioError event to be dispatched:
import fl.containers.UILoader;

var url:String = "http://www.helpexamples.com/flash/images/image404.jpg"

var myUILoader:UILoader = new UILoader();
myUILoader.load(new URLRequest(url));
myUILoader.move(10, 10);
myUILoader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
addChild(myUILoader);

function ioErrorHandler(event:IOErrorEvent):void {
    trace("<<", event.text, ">>");
    myUILoader.removeEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    removeChild(myUILoader);
}

open

Event  
Event Object Type: flash.events.Event
property Event.type = flash.events.Event.OPEN

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched after a network operation starts.

The Event.OPEN constant defines the value of the type property of an open event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object that has opened a connection.

progress

Event  
Event Object Type: flash.events.ProgressEvent
property ProgressEvent.type = flash.events.ProgressEvent.PROGRESS

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched while content is loading.

Defines the value of the type property of a progress event object.

This event has the following properties:

PropertyValue
bubblesfalse
bytesLoadedThe number of items or bytes loaded at the time the listener processes the event.
bytesTotalThe total number of items or bytes that ultimately will be loaded if the loading process succeeds.
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe object reporting progress.

Example  ( How to use this example )

The following example loads an external image into a ScrollPane instance and displays the bytesLoaded, bytesTotal and percentLoaded properties by listening for the progress and complete events:
import fl.containers.ScrollPane;

var url:String = "http://www.helpexamples.com/flash/images/image1.jpg";

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.setSize(320, 240);
myScrollPane.move(10, 10);
myScrollPane.addEventListener(ProgressEvent.PROGRESS, progressHandler);
myScrollPane.addEventListener(Event.COMPLETE, completeHandler);
myScrollPane.load(new URLRequest(url));
addChild(myScrollPane);

function progressHandler(event:ProgressEvent):void {
    var bLoaded:int = event.bytesLoaded;
    var bTotal:int = event.bytesTotal;
    var pctLoaded:int = int(event.currentTarget.percentLoaded);
    trace("progress: " + bLoaded + " of " + bTotal + " bytes loaded (" + pctLoaded + "%)");
}

function completeHandler(event:Event):void {
    trace("complete:");
}

Related API Elements

scroll

Event  
Event Object Type: fl.events.ScrollEvent
property ScrollEvent.type = fl.events.ScrollEvent.SCROLL

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched when the user scrolls content by using the scroll bars on the component or the wheel on a mouse device.

Defines the value of the type property of a scroll event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the event object with an event listener.
delta1; a value that indicates how much scrolling was done.
directionvertical; the direction of the ScrollBar.
position0; the position of the Scrollbar thumb after it was moved.
targetThe object that dispatched the event. The target is not always the object listening for the event. Use the currentTarget property to access the object that is listening for the event.

Example  ( How to use this example )

The following example listens for the scroll event and uses the direction property of the ScrollEvent class to determine if the content was scrolled horizontally or vertically:
import fl.containers.ScrollPane;
import fl.events.ScrollEvent;
import fl.controls.ScrollBarDirection;

var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.scrollDrag = true;
myScrollPane.source = "http://www.helpexamples.com/flash/images/image1.jpg";
myScrollPane.addEventListener(ScrollEvent.SCROLL, scrollHandler);
addChild(myScrollPane);

function scrollHandler(event:ScrollEvent):void {
    switch (event.direction) {
        case ScrollBarDirection.HORIZONTAL:
            trace("horizontal scroll", event.position, "of", event.currentTarget.maxHorizontalScrollPosition);
            break;
        case ScrollBarDirection.VERTICAL:
            trace("vertical scroll", event.position, "of", event.currentTarget.maxVerticalScrollPosition);
            break;
    }
}

securityError

Event  
Event Object Type: flash.events.SecurityErrorEvent
property SecurityErrorEvent.type = flash.events.SecurityErrorEvent.SECURITY_ERROR

Language Version: ActionScript 3.0
Product Version: Flash CS3
Runtime Versions: Flash Player 9.0.28.0, AIR 1.0

Dispatched after a security error occurs while content is loading.

The SecurityErrorEvent.SECURITY_ERROR constant defines the value of the type property of a securityError event object.

This event has the following properties:

PropertyValue
bubblesfalse
cancelablefalse; there is no default behavior to cancel.
currentTargetThe object that is actively processing the Event object with an event listener.
targetThe network object reporting the security error.
textText to be displayed as an error message.
ScrollPaneExample.as

This example demonstrates how to initiate an instance of ScrollPane to load new content, activate dragging, and update the viewer's view relative to the entire image as they drag.
  1. Place an image test.jpg in the same directory as your FLA (the larger the better)
  2. Add the ScrollPane component to your library
  3. Save this code as ScrollPaneExample.as in the same directory as your FLA.
  4. Set the DocumentClass in the FLA to ScrollPaneExample.

Note:The image must be larger than the ScrollPane (425x380) to interact with the image. The image must also be smaller than 2880 width and height in order for a image to appear in the preview window due to tha maximum dimensions of bitmap data.

package
{
    import flash.display.Sprite;
    import flash.display.Shape;
    import flash.display.MovieClip;
    import flash.events.*;    
    import flash.geom.Rectangle;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    import fl.containers.ScrollPane;
    import fl.events.ScrollEvent;

    public class ScrollPaneExample extends Sprite
    {
        private var sampleImagePath:String = "test.jpg";
        private var sp:ScrollPane;
        private var previewPositioner:Sprite;
        private var windowSize:Number = 100;
        private var box:Sprite;
        
        public function ScrollPaneExample() {
            stage.frameRate = 31;
            createScrollPane();
        }
        private function createScrollPane():void {
            sp = new ScrollPane();
            sp.move(10,10);
            sp.setSize(425,380);
            sp.source = sampleImagePath;
            sp.addEventListener(Event.COMPLETE,createPreviewWindow);
            sp.addEventListener(ScrollEvent.SCROLL,repositionPreview);
            sp.scrollDrag = true;
            addChild(sp);            
        }
        private function createPreviewWindow(e:Event):void {
            var previewWindow:Sprite = new Sprite();
            previewWindow.x = 445;
            previewWindow.y = 10;
            previewWindow.graphics.lineStyle(1,0,1);
            previewWindow.graphics.drawRect(0,0,windowSize,windowSize);
            addChild(previewWindow);

            var bitmapData:BitmapData
            try {
                bitmapData = new BitmapData(sp.content.width,sp.content.height);
                bitmapData.draw(sp.content);
                var bitmap:Bitmap = new Bitmap(bitmapData);
                bitmap.width = windowSize;
                bitmap.height = windowSize;
                bitmap.alpha = 0.25
                previewWindow.addChild(bitmap);            
            }
            catch (e:Error) {
                trace(e.toString());
            }
            
            previewPositioner = new Sprite();
            previewPositioner.graphics.beginFill(0xFFFFFF,0.5);
            previewPositioner.graphics.lineStyle(1,0,0.5);
            previewPositioner.graphics.drawRect(0,0,getHorizontalAspect() * windowSize, getVerticalAspect() * windowSize);
            previewPositioner.addEventListener(MouseEvent.MOUSE_DOWN, dragPreviewPositioner);
            previewPositioner.addEventListener(MouseEvent.MOUSE_UP, dropPreviewPositioner);
            previewWindow.addChild(previewPositioner);
        }
        private function dragPreviewPositioner(e:MouseEvent):void {
            var bounds:Rectangle = new Rectangle(0,0,windowSize - Math.floor(previewPositioner.width) + 1,windowSize - Math.floor(previewPositioner.height) + 1);
            previewPositioner.startDrag(false,bounds);
            previewPositioner.addEventListener(MouseEvent.MOUSE_MOVE, repositionScrollPane);
        }
        private function dropPreviewPositioner(e:MouseEvent):void {
            previewPositioner.stopDrag();
            previewPositioner.removeEventListener(MouseEvent.MOUSE_MOVE, repositionScrollPane);
        }
        private function repositionScrollPane(e:MouseEvent):void {
            sp.horizontalScrollPosition = (previewPositioner.x / windowSize) * sp.content.width;
            sp.verticalScrollPosition = (previewPositioner.y / windowSize) * sp.content.height;
        }
        private function repositionPreview(e:ScrollEvent):void {
            previewPositioner.x = (sp.horizontalScrollPosition * windowSize) / sp.content.width;
            previewPositioner.y = (sp.verticalScrollPosition * windowSize) / sp.content.height;
        }
        private function getHorizontalAspect():Number {
            return sp.width / sp.content.width;
        }
        private function getVerticalAspect():Number {
            return sp.height / sp.content.height;
        }
    }
}