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
Top Level 

Vector  - AS3

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

Classes x

AAAARecord    
AbandonCommand
ABRUtils
AbstractConsumer
AbstractEntityMetadata
AbstractEvent
AbstractInvoker
AbstractMessage
AbstractOperation
AbstractOperation
AbstractParticipant
AbstractProducer
AbstractSearchFilterVO
AbstractService
AbstractServiceWrapper
AbstractStage
AbstractTarget
AbstractWebService
AccConst
Accelerometer
AccelerometerEvent
Accessibility
AccessibilityImplementation
AccessibilityProperties
AccessibleButton
AccessibleText
AccessPrivileges
AccImpl
AccImpl
Accordion
AccordionAutomationImpl
AccordionHeader
AccordionHeaderAccImpl
AccordionHeaderSkin
AccordionHeaderSkin
AccordionHeaderSkin
AccordionNav
AccordionSkin
AcknowledgeMessage
ACMRelationshipManager
ActionBar
ActionBar    
ActionBarButtonSkinBase
ActionBarDefaultButtonAppearance    
ActionBarSkin    
ActionEffectInstance
ActionRenderer
ActionScriptVersion
ActionSelectedEvent
ActivationBrowser
ActivatorSkin
ActiveContentEvent
ActiveDataEvent
ActivityEvent
ActualBitrateMetric
AddAction
AddActionInstance
AddApprovalStageParticipant
AddAssetPopUp
AddChild
AddChildAction
AddChildActionInstance
AddCreatorDialog
AddItemAction
AddItemActionInstance
AddItems
AddPanelButton
AddPanelEvent
AddRemoveEffectTargetFilter
AddReviewStageParticipant
AddServiceEvent
AddStageParticipant
AddTileEvent
AddViewEvent
AddViewManagerEvent
AdjustColor
AdvanceDataElementsPanel
AdvancedChannelSet
AdvancedDataGrid
AdvancedDataGridAccImpl
AdvancedDataGridAutomationImpl
AdvancedDataGridBase
AdvancedDataGridBaseEx
AdvancedDataGridBaseExAutomationImpl
AdvancedDataGridBaseSelectionData
AdvancedDataGridColumn
AdvancedDataGridColumnGroup
AdvancedDataGridDragProxy
AdvancedDataGridEvent
AdvancedDataGridEventReason
AdvancedDataGridGroupItemRenderer
AdvancedDataGridGroupItemRendererAutomationImpl
AdvancedDataGridHeaderHorizontalSeparator
AdvancedDataGridHeaderInfo
AdvancedDataGridHeaderRenderer
AdvancedDataGridHeaderShiftEvent
AdvancedDataGridItemRenderer
AdvancedDataGridItemRendererAutomationImpl
AdvancedDataGridItemSelectEvent
AdvancedDataGridListData
AdvancedDataGridRendererDescription
AdvancedDataGridRendererProvider
AdvancedDataGridSortItemRenderer
AdvancedListBase
AdvancedListBaseAutomationImpl
AdvancedListBaseContentHolderAutomationImpl
AdvancedSearchPod
AdvancedStyleClient
AfterUpSwitchBufferBandwidthRule
AggregatingToken
AggregatingTokenError
AirDragManagerAutomationHandler
AIREvent    
AirFunctionsHelper
Alert
AlertAccImpl
AlertAutomationImpl
AlertFormatter
AlertFormAutomationImpl
AlignmentArea
AllRuntimeSparkControls
AlternativeAudioEvent
AlternativeAudioTrait
AMFChannel
AndOperator
Animate
AnimateColor
AnimateColorInstance
AnimateFilter
AnimateFilterInstance
AnimateInstance
AnimateProperty
AnimatePropertyInstance
AnimateTransform
AnimateTransform3D
AnimateTransformInstance
AnimateTransitionShader
AnimateTransitionShaderInstance
Animation
Animator
Animator3D
AnimatorBase
AnimatorFactory
AnimatorFactory3D
AnimatorFactoryBase
AnimatorFactoryUniversal
AnimatorUniversal
AnnotationParseEvent
AntiAliasType
Application
Application
Application
ApplicationAutomationImpl
ApplicationBackground
ApplicationConstants
ApplicationControlBar
ApplicationDomain
ApplicationDomainTarget
ApplicationListItem
ApplicationSkin
ApplicationSkin
ApplicationSpecifier
ApplicationTitleBarBackgroundSkin    
ApplicationUpdater    
ApplicationUpdaterUI    
ApplyElementIDOperation
ApplyElementStyleNameOperation
ApplyElementTypeNameOperation
ApplyElementUserStyleOperation
ApplyFormatOperation
ApplyFormatToElementOperation
ApplyLinkOperation
ApplyTCYOperation
ApprovalStage
ApprovalStage
Approver
Approver
ApproverCollection
ApproverStatus
ApproverStatus
ApproverVO
AreaChart
AreaRenderer
AreaSeries
AreaSeriesAutomationImpl
AreaSeriesItem
AreaSeriesRenderData
AreaSet
ARecord    
ArgumentError
arguments
Array
ArrayCollection
ArrayList
ArrayUtil
ArrowDirection    
Asset
AssetAction
AssetAction
AssetActionCompleteEvent
AssetActionCompleteEvent
AssetActionEvent
AssetActionEvent
AssetActionsChangeEvent
AssetDetailsPod
AssetEvent
AssetExplorerServiceDelegate
AssetFocusEvent
AssetHandlerRegistry
AssetHandlerRegistry
AssetManager
AssetManager
AssetManagerView
AssetModel
AssetPod
AssetPropertiesEditor
AssetPropertyDescriptor
AssetPropertyDescriptor
AssetQueryServiceDelegate
AssetReviewPod
AssetTypeDescriptor
AssetTypeDescriptor
AssetValidationEvent
AssetValidationFaultType
AssetVersionPod
AssetVO
Assignment
AssignmentConstants
AsyncErrorEvent
AsyncListView
AsyncMessage
AsyncRequest
AsyncResponder
AsyncToken
AsyncTokenResponder
AsyncTokenWrapper
Attachment
AttachmentCommand
AttachmentEvent
AttachmentHeader
AttachmentHeaderBase
AttachmentHeaderModel
AttachmentIconRenderer
AttachmentIconRendererSkin
AttachmentInfo
AttachmentList
AttachmentList
AttachmentListComponent
AttachmentListModel
AttachmentListSkin
AttachmentLoader
AttachmentPermissions
Attachments
AttachmentsModel
Attribute
AudioDecoder
AudioDeviceManager
AudioElement
AudioEvent
AudioOutputChangeEvent
AudioOutputChangeReason
AudioPlaybackMode    
AudioTrait
AuditActionVO
AuditAttributeVO
AuditLevel
AuditLevel
AuditLevelVO
AuditManager
AuditMetaInfoVO
AuditModuleVO
Auditor
AugmentedError
AugmentedErrorEvent
AuthenticatingApplication
AuthenticationEvent
AuthenticationMethod
AuthFailureCode
AuthOptions
Author
AuthorStatus
AuthorVO
AuthResult
AuthStatus
AutoCapitalize    
AutoLayoutEvent
Automation
AutomationAirEvent
AutomationClass
AutomationDragEvent
AutomationDragEventWithPositionInfo
AutomationError
AutomationEvent
AutomationEventDescriptor
AutomationFlexNativeMenuEvent
AutomationHelper
AutomationID
AutomationIDPart
AutomationManager
AutomationMethodDescriptor
AutomationPropertyDescriptor
AutomationRecordEvent
AutomationReplayEvent
AvailablePropertyIterator
AvailableQualityLevelsMetric
AVDictionaryDataEvent
AverageAggregator
AVHTTPStatusEvent
AVLoader
AVM1Movie
AVNetworkingParams
AVPauseAtPeriodEndEvent
AVTagData
AVURLLoader
AVURLStream
AxisBase
AxisLabel
AxisLabelSet
AxisRenderer
AxisRendererAutomationImpl
AXMAccordion
AXMAccordionItemVO
AXMAccordionSegment
AXMBreadCrumb
AXMButton
AXMButtonBar
AXMButtonBarButton
AXMCheckBox
AXMComboBox
AXMDropDownList
AXMDropDownListBase
AXMEnterpriseAccordionSegmentSkin
AXMEnterpriseAccordionSkin
AXMEnterpriseAssetTabBar
AXMEnterpriseAssetTabBarButtonSkin
AXMEnterpriseAssetTabBarSkin
AXMEnterpriseAssetViewTabBar
AXMEnterpriseAssetViewTabBarButtonSkin
AXMEnterpriseAssetViewTabBarSkin
AXMEnterpriseBreadCrumbButtonSkin
AXMEnterpriseBreadCrumbFocusSkin
AXMEnterpriseBreadCrumbSkin
AXMEnterpriseButtonBarFirstButtonSkin
AXMEnterpriseButtonBarLastButtonSkin
AXMEnterpriseButtonBarMiddleButtonSkin
AXMEnterpriseButtonBarSkin
AXMEnterpriseButtonSkin
AXMEnterpriseCheckboxSkin
AXMEnterpriseCheckboxSmallSkin
AXMEnterpriseClosableTabBarButtonSkin
AXMEnterpriseClosableTabBarSkin
AXMEnterpriseCloseButtonSkin
AXMEnterpriseComboBoxButtonSkin
AXMEnterpriseComboBoxSkin
AXMEnterpriseComboBoxTextInputSkin
AXMEnterpriseDropDownListButtonSkin
AXMEnterpriseDropDownListItemRenderer
AXMEnterpriseDropDownListSkin
AXMEnterpriseFocusSkin
AXMEnterpriseFooterSkin
AXMEnterpriseGridHeaderRenderer
AXMEnterpriseGridSkin
AXMEnterpriseHeaderBarSkin
AXMEnterpriseHeaderButtonBar
AXMEnterpriseHScrollBarLargeSkin
AXMEnterpriseHScrollbarNoControlsSkin
AXMEnterpriseHScrollbarSkin
AXMEnterpriseHScrollbarThumbSkin
AXMEnterpriseHScrollbarTrackNoControlsSkin
AXMEnterpriseHScrollbarTrackSkin
AXMEnterpriseIconButtonSkin
AXMEnterpriseLargeButtonSkin
AXMEnterpriseLargeToggleButtonSkin
AXMEnterpriseNavigationButtonBarSkin
AXMEnterpriseNumericStepperDecrementButtonSkin
AXMEnterpriseNumericStepperIncrementButtonSkin
AXMEnterpriseNumericStepperSkin
AXMEnterpriseNumericStepperTextInputSkin
AXMEnterprisePanelSkin
AXMEnterpriseProgressSpinnerSkin
AXMEnterpriseQuietButtonSkin
AXMEnterpriseQuietHeaderBarButton
AXMEnterpriseQuietLargeButtonSkin
AXMEnterpriseQuietLargeDropDownListButtonSkin
AXMEnterpriseRadioButtonSkin
AXMEnterpriseResizeHandleSkin
AXMEnterpriseScrollDownArrowSkin
AXMEnterpriseScrollLeftArrowSkin
AXMEnterpriseScrollRightArrowSkin
AXMEnterpriseScrollUpArrowSkin
AXMEnterpriseSlideToggleButton
AXMEnterpriseSplitActionButtonSkin
AXMEnterpriseSplitActionPopUpButtonSkin
AXMEnterpriseSplitActionSkin
AXMEnterpriseTabBarButtonSkin
AXMEnterpriseTabBarSkin
AXMEnterpriseTextAreaSkin
AXMEnterpriseTextInputSkin
AXMEnterpriseTitleWindowSkin
AXMEnterpriseToggleButtonSkin
AXMEnterpriseToolBarBottomSkin
AXMEnterpriseToolBarButtonBarFirstButtonSkin
AXMEnterpriseToolBarButtonBarLastButtonSkin
AXMEnterpriseToolBarButtonBarMiddleButtonSkin
AXMEnterpriseToolbarButtonBarSkin
AXMEnterpriseToolBarTopSkin
AXMEnterpriseViewModeButtonBarButtonSkin
AXMEnterpriseViewModeButtonBarSkin
AXMEnterpriseVScrollbarNoControlsSkin
AXMEnterpriseVScrollbarSkin
AXMEnterpriseVScrollbarThumbSkin
AXMEnterpriseVScrollbarTrackNoControlsSkin
AXMEnterpriseVScrollbarTrackSkin
AXMHeaderBar
AXMHScrollBar
AXMLightItemRenderer
AXMList
AXMPopUp
AXMProgressBar
AXMProgressSpinner
AXMResizableContainer
AXMRichTextEditor
AXMRichTextEditorControlBar
AXMScroller
AXMSplitActionButton
AXMSwitch
AXMTabBar
AXMTabBarButton
AXMTitleWindow
AXMToggleButton
AXMToolPopUp
AXMToolPopUpDropDownController
AXMVerticalDivider
AXMVScrollBar
PackageTop Level
Classpublic dynamic class Vector
InheritanceVector Inheritance Object

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

The Vector class lets you access and manipulate a vector — an array whose elements all have the same data type. The data type of a Vector's elements is known as the Vector's base type. The base type can be any class, including built in classes and custom classes. The base type is specified when declaring a Vector variable as well as when creating an instance by calling the class constructor.

As with an Array, you can use the array access operator ([]) to set or retrieve the value of a Vector element. Several Vector methods also provide mechanisms for setting and retrieving element values. These include push(), pop(), shift(), unshift(), and others. The properties and methods of a Vector object are similar — in most cases identical — to the properties and methods of an Array. In most cases where you would use an Array in which all the elements have the same data type, a Vector instance is preferable. However, Vector instances are dense arrays, meaning it must have a value (or null) in each index. Array instances don't have this same restriction.

The Vector's base type is specified using postfix type parameter syntax. Type parameter syntax is a sequence consisting of a dot (.), left angle bracket (<), class name, then a right angle bracket (>), as shown in this example:

In the first line of the example, the variable v is declared as a Vector.<String> instance. In other words, it represents a Vector (an array) that can only hold String instances and from which only String instances can be retrieved. The second line constructs an instance of the same Vector type (that is, a Vector whose elements are all String objects) and assigns it to v.

 var v:Vector.<String>;
 v = new Vector.<String>();
 

A variable declared with the Vector.<T> data type can only store a Vector instance that is constructed with the same base type T. For example, a Vector that's constructed by calling new Vector.<String>() can't be assigned to a variable that's declared with the Vector.<int> data type. The base types must match exactly. For example, the following code doesn't compile because the object's base type isn't the same as the variable's declared base type (even though Sprite is a subclass of DisplayObject):

 // This code doesn't compile even though Sprite is a DisplayObject subclass
 var v:Vector.<DisplayObject> = new Vector.<Sprite>();
 

To convert a Vector with base type T to a Vector of a superclass of T, use the Vector() global function.

In addition to the data type restriction, the Vector class has other restrictions that distinguish it from the Array class:

  • A Vector is a dense array. Unlike an Array, which may have values in indices 0 and 7 even if there are no values in positions 1 through 6, a Vector must have a value (or null) in each index.
  • A Vector can optionally be fixed-length, meaning the number of elements it contains can't change.
  • Access to a Vector's elements is bounds-checked. You can never read a value from an index greater than the final element (length - 1). You can never set a value with an index more than one beyond the current final index (in other words, you can only set a value at an existing index or at index [length]).

As a result of its restrictions, a Vector has three primary benefits over an Array instance whose elements are all instances of a single class:

  • Performance: array element access and iteration are much faster when using a Vector instance than they are when using an Array.
  • Type safety: in strict mode the compiler can identify data type errors. Examples of data type errors include assigning a value of the incorrect data type to a Vector or expecting the wrong data type when reading a value from a Vector. Note, however, that when using the push() method or unshift() method to add values to a Vector, the arguments' data types are not checked at compile time. Instead, they are checked at run time.
  • Reliability: runtime range checking (or fixed-length checking) increases reliability significantly over Arrays.

More examples

Learn more

Related API Elements



Public Properties
 PropertyDefined By
 Inheritedconstructor : Object
A reference to the class object or constructor function for a given object instance.
Object
  fixed : Boolean
Indicates whether the length property of the Vector can be changed.
Vector
  length : uint
The range of valid indices available in the Vector.
Vector
Public Methods
 MethodDefined By
  
Vector(length:uint = 0, fixed:Boolean = false)
Creates a Vector with the specified base type.
Vector
  
concat(... args):Vector.<T>
Concatenates the Vectors specified in the parameters list with the elements in this Vector and creates a new Vector.
Vector
  
every(callback:Function, thisObject:Object = null):Boolean
Executes a test function on each item in the Vector until an item is reached that returns false for the specified function.
Vector
  
filter(callback:Function, thisObject:Object = null):Vector.<T>
Executes a test function on each item in the Vector and returns a new Vector containing all items that return true for the specified function.
Vector
  
forEach(callback:Function, thisObject:Object = null):void
Executes a function on each item in the Vector.
Vector
 Inherited
Indicates whether an object has a specified property defined.
Object
  
indexOf(searchElement:T, fromIndex:int = 0):int
Searches for an item in the Vector and returns the index position of the item.
Vector
  
insertAt(index:int, element:T):void
Insert a single element into the Vector.
Vector
 Inherited
Indicates whether an instance of the Object class is in the prototype chain of the object specified as the parameter.
Object
  
join(sep:String = ","):String
Converts the elements in the Vector to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string.
Vector
  
lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int
Searches for an item in the Vector, working backward from the specified index position, and returns the index position of the matching item.
Vector
  
map(callback:Function, thisObject:Object = null):Vector.<T>
Executes a function on each item in the Vector, and returns a new Vector of items corresponding to the results of calling the function on each item in this Vector.
Vector
  
pop():T
Removes the last element from the Vector and returns that element.
Vector
 Inherited
Indicates whether the specified property exists and is enumerable.
Object
  
push(... args):uint
Adds one or more elements to the end of the Vector and returns the new length of the Vector.
Vector
  
removeAt(index:int):T
Remove a single element from the Vector.
Vector
  
Reverses the order of the elements in the Vector.
Vector
 Inherited
Sets the availability of a dynamic property for loop operations.
Object
  
shift():T
Removes the first element from the Vector and returns that element.
Vector
  
slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T>
Returns a new Vector that consists of a range of elements from the original Vector, without modifying the original Vector.
Vector
  
some(callback:Function, thisObject:Object = null):Boolean
Executes a test function on each item in the Vector until an item is reached that returns true.
Vector
  
sort(sortBehavior:*):Vector.<T>
Sorts the elements in the Vector object, and also returns a sorted Vector object.
Vector
  
splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T>
Adds elements to and removes elements from the Vector.
Vector
  
Returns a string that represents the elements in the specified Vector.
Vector
  
Returns a string that represents the elements in the Vector.
Vector
  
Adds one or more elements to the beginning of the Vector and returns the new length of the Vector.
Vector
 Inherited
Returns the primitive value of the specified object.
Object
Property Detail

fixed

property
fixed:Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Indicates whether the length property of the Vector can be changed. If the value is true, the length property can't be changed. This means the following operations are not allowed when fixed is true:

  • setting the length property directly
  • assigning a value to index position length
  • calling a method that changes the length property, including:
    • pop()
    • push()
    • shift()
    • unshift()
    • splice() (if the splice() call changes the length of the Vector).



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

length

property 
length:uint

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

The range of valid indices available in the Vector. A Vector instance has index positions up to but not including the length value.

Every Vector element always has a value that is either an instance of the base type or null. When the length property is set to a value that's larger than its previous value, additional elements are created and populated with the default value appropriate to the base type (null for reference types).

When the length property is set to a value that's smaller than its previous value, all the elements at index positions greater than or equal to the new length value are removed from the Vector.



Implementation
    public function get length():uint
    public function set length(value:uint):void

Throws
RangeError — If this property is changed while fixed is true.
 
RangeError — If this property is set to a value larger than the maximum allowable index (232).
Constructor Detail

Vector

()Constructor
public function Vector(length:uint = 0, fixed:Boolean = false)

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Creates a Vector with the specified base type.

When calling the Vector.<T>() constructor, specify the base type using type parameter syntax. Type parameter syntax is a sequence consisting of a dot (.), left angle bracket (<), class name, then a right angle bracket (>), as shown in this example:

Copy
     var v:Vector.<String> = new Vector.<String>();
     

To create a Vector instance from an Array or another Vector (such as one with a different base type), use the Vector() global function.

To create a pre-populated Vector instance, use the following syntax instead of using the parameters specified below:

Copy
     // var v:Vector.<T> = new <T>[E0, ..., En-1 ,];
     // For example: 
     var v:Vector.<int> = new <int>[0,1,2,];
     

The following information applies to this syntax:

  • It is supported in Flash Professional CS5 and later, Flash Builder 4 and later, and Flex 4 and later.
  • The trailing comma is optional.
  • Empty items in the array are not supported; a statement such as var v:Vector.<int> = new <int>[0,,2,] throws a compiler error.
  • You can't specify a default length for the Vector instance. Instead, the length is the same as the number of elements in the initialization list.
  • You can't specify whether the Vector instance has a fixed length. Instead, use the fixed property.
  • Data loss or errors can occur if items passed as values don't match the specified type. For example:
  • Copy
         var v:Vector.<int> = new <int>[4.2]; // compiler error when running in strict mode
         trace(v[0]); //returns 4 when not running in strict mode
         

Parameters
length:uint (default = 0) — The initial length (number of elements) of the Vector. If this parameter is greater than zero, the specified number of Vector elements are created and populated with the default value appropriate to the base type (null for reference types).
 
fixed:Boolean (default = false) — Whether the Vector's length is fixed (true) or can be changed (false). This value can also be set using the fixed property.

Related API Elements

Method Detail

concat

()method
AS3 function concat(... args):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Concatenates the Vectors specified in the parameters list with the elements in this Vector and creates a new Vector. The Vectors in the parameters list must have the same base type, or subtype, as this Vector. If you do not pass any parameters, the returned Vector is a duplicate (shallow clone) of the original Vector.

Parameters

... args — Zero or more Vectors of the base type, or subtype, of this Vector.

Returns
Vector.<T> — A Vector with the same base type as this Vector that contains the elements from this Vector followed by elements from the Vectors in the parameters list.

Throws
TypeError — If any argument is not a Vector of the base type, or cannot be converted to a Vector of the base type.

More examples

every

()method 
AS3 function every(callback:Function, thisObject:Object = null):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Executes a test function on each item in the Vector until an item is reached that returns false for the specified function. You use this method to determine whether all items in a Vector meet a criterion, such as having values less than a particular number.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

    function myFunction(item:T, index:int, vector:Vector.<T>):Boolean {
       // your code here
    }
    

Suppose you then use the every() method on a Vector called myVector:

    myVector.every(myFunction, someObject);
    

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

    var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
        //your code here
    };
    myVector.every(myFunction, someObject);
    

Parameters

callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean {
       // your code here
    }
    

The callback function should return a Boolean value.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Boolean — A Boolean value of true if the specified function returns true when called on all items in the Vector; otherwise, false.

Related API Elements

filter

()method 
AS3 function filter(callback:Function, thisObject:Object = null):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Executes a test function on each item in the Vector and returns a new Vector containing all items that return true for the specified function. If an item returns false, it is not included in the result Vector. The base type of the return Vector matches the base type of the Vector on which the method is called.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

     function myFunction(item:T, index:int, vector:Vector.<T>):Boolean {
        // your code here
     }
     

Suppose you then use the filter() method on a Vector called myVector:

     var result:Vector.<T> = myVector.filter(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
         //your code here
     };
     myVector.filter(myFunction, someObject);
     

Parameters

callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean;
 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Vector.<T> — A new Vector that contains all items from the original Vector for which the callback function returned true.

Related API Elements

forEach

()method 
AS3 function forEach(callback:Function, thisObject:Object = null):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Executes a function on each item in the Vector.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline using Flash Professional, but you want it to be called in a different this context:

     function myFunction(item:T, index:int, vector:Vector.<T>):void {
        // your code here
     }
     

Suppose you then use the forEach() method on a Vector called myVector:

     myVector.forEach(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):void {
         //your code here
     };
     myVector.forEach(myFunction, someObject);
     

Parameters

callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):void;

Any return value from the function call is discarded.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

indexOf

()method 
AS3 function indexOf(searchElement:T, fromIndex:int = 0):int

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Searches for an item in the Vector and returns the index position of the item. The item is compared to the Vector elements using strict equality (===).

Parameters

searchElement:T — The item to find in the Vector.
 
fromIndex:int (default = 0) — The location in the Vector from which to start searching for the item. If this parameter is negative, it is treated as length + fromIndex, meaning the search starts -fromIndex items from the end and searches from that position forward to the end of the Vector.

Returns
int — A zero-based index position of the item in the Vector. If the searchElement argument is not found, the return value is -1.

Related API Elements

insertAt

()method 
AS3 function insertAt(index:int, element:T):void

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 19, AIR 19

Insert a single element into the Vector. This method modifies the Vector without making a copy.

Parameters

index:int — An integer that specifies the position in the Vector where the element is to be inserted. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).
 
element:T


Throws
RangeError — If this method is called while fixed is true.

join

()method 
AS3 function join(sep:String = ","):String

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Converts the elements in the Vector to strings, inserts the specified separator between the elements, concatenates them, and returns the resulting string. A nested Vector is always separated by a comma (,), not by the separator passed to the join() method.

Parameters

sep:String (default = ",") — A character or string that separates Vector elements in the returned string. If you omit this parameter, a comma is used as the default separator.

Returns
String — A string consisting of the elements of the Vector converted to strings and separated by the specified string.

More examples

Related API Elements

lastIndexOf

()method 
AS3 function lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Searches for an item in the Vector, working backward from the specified index position, and returns the index position of the matching item. The item is compared to the Vector elements using strict equality (===).

Parameters

searchElement:T — The item to find in the Vector.
 
fromIndex:int (default = 0x7fffffff) — The location in the Vector from which to start searching for the item. The default is the maximum allowable index value, meaning that the search starts at the last item in the Vector.

If this parameter is negative, it is treated as length + fromIndex, meaning the search starts -fromIndex items from the end and searches from that position backward to index 0.

Returns
int — A zero-based index position of the item in the Vector. If the searchElement argument is not found, the return value is -1.

Related API Elements

map

()method 
AS3 function map(callback:Function, thisObject:Object = null):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Executes a function on each item in the Vector, and returns a new Vector of items corresponding to the results of calling the function on each item in this Vector. The result Vector has the same base type and length as the original Vector. The element at index i in the result Vector is the result of the call on the element at index i in the original Vector.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline, using Flash Professional but you want it to be called in a different this context:

     function myFunction(item:Object, index:int, vector:Vector.<T>):T {
        // your code here
     }
     

Suppose you then use the map() method on a Vector called myVector:

     myVector.map(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):void {
         //your code here
     };
     myVector.map(myFunction, someObject);
     

Parameters

callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):T;
 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Vector.<T> — A new Vector that contains the results of calling the function on each item in this Vector. The result Vector has the same base type and length as the original.

Related API Elements

pop

()method 
AS3 function pop():T

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Removes the last element from the Vector and returns that element. The length property of the Vector is decreased by one when this function is called.

Returns
T — The value of the last element in the specified Vector.

Throws
RangeError — If this method is called while fixed is true.

More examples

Related API Elements

push

()method 
AS3 function push(... args):uint

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Adds one or more elements to the end of the Vector and returns the new length of the Vector.

Because this function can accept multiple arguments, the data type of the arguments is not checked at compile time even in strict mode. However, if an argument is passed that is not an instance of the base type, an exception occurs at run time.

Parameters

... args — One or more values to append to the Vector.

Returns
uint — The length of the Vector after the new elements are added.

Throws
TypeError — If any argument is not an instance of the base type T of the Vector.
 
RangeError — If this method is called while fixed is true.

More examples

Related API Elements

removeAt

()method 
AS3 function removeAt(index:int):T

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 19, AIR 19

Remove a single element from the Vector. This method modifies the Vector without making a copy.

Parameters

index:int — An integer that specifies the index of the element in the Vector that is to be deleted. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).

Returns
T — The element that was removed from the original Vector.

Throws
RangeError — If the index argument specifies an index to be deleted that's outside the Vector's bounds.
 
RangeError — If this method is called while fixed is true.

reverse

()method 
AS3 function reverse():Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Reverses the order of the elements in the Vector. This method alters the Vector on which it is called.

Returns
Vector.<T> — The Vector with the elements in reverse order.

More examples

shift

()method 
AS3 function shift():T

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Removes the first element from the Vector and returns that element. The remaining Vector elements are moved from their original position, i, to i - 1.

Returns
T — The first element in the Vector.

Throws
RangeError — If fixed is true.

More examples

Related API Elements

slice

()method 
AS3 function slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Returns a new Vector that consists of a range of elements from the original Vector, without modifying the original Vector. The returned Vector includes the startIndex element and all elements up to, but not including, the endIndex element.

If you don't pass any parameters, the new Vector is a duplicate (shallow clone) of the original Vector. If you pass a value of 0 for both parameters, a new, empty Vector is created of the same type as the original Vector.

Parameters

startIndex:int (default = 0) — A number specifying the index of the starting point for the slice. If startIndex is a negative number, the starting point begins at the end of the Vector, where -1 is the last element.
 
endIndex:int (default = 16777215) — A number specifying the index of the ending point for the slice. If you omit this parameter, the slice includes all elements from the starting point to the end of the Vector. If endIndex is a negative number, the ending point is specified from the end of the Vector, where -1 is the last element.

Returns
Vector.<T> — a Vector that consists of a range of elements from the original Vector.

More examples

some

()method 
AS3 function some(callback:Function, thisObject:Object = null):Boolean

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Executes a test function on each item in the Vector until an item is reached that returns true. Use this method to determine whether any items in a Vector meet a criterion, such as having a value less than a particular number.

For this method, the second parameter, thisObject, must be null if the first parameter, callback, is a method closure. That is the most common way of using this method.

However, suppose you create a function on a frame on the main timeline, but you want it to be called in a different this context:

     function myFunction(item:Object, index:int, vector:Vector.<T>):Boolean {
        // your code here
     }
     

Suppose you then use the some() method on a Vector called myVector:

     myVector.some(myFunction, someObject);
     

Because myFunction is a member of the main class of the SWF file, it cannot be executed in a different this context. Flash runtimes throw an exception when this code runs. You can avoid this runtime error by assigning the function to a variable, as follows:

     var myFunction:Function = function(item:T, index:int, vector:Vector.<T>):Boolean {
         //your code here
     };
     myVector.some(myFunction, someObject);
     

Parameters

callback:Function — The function to run on each item in the Vector. This function is invoked with three arguments: the current item from the Vector, the index of the item, and the Vector object:
function callback(item:T, index:int, vector:Vector.<T>):Boolean

The callback function should return a Boolean value.

 
thisObject:Object (default = null) — The object that the identifer this in the callback function refers to when the function is called.

Returns
Boolean — A Boolean value of true if any items in the Vector return true for the specified function; otherwise, false.

Related API Elements

sort

()method 
AS3 function sort(sortBehavior:*):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Sorts the elements in the Vector object, and also returns a sorted Vector object. This method sorts according to the parameter sortBehavior, which is either a function that compares two values, or a set of sorting options.

The method takes one parameter. The parameter is one of the following:

  • a function that takes two arguments of the base type (T) of the Vector and returns a Number:
    function compare(x:T, y:T):Number {}

    The logic of the function is that, given two elements x and y, the function returns one of the following three values:

    • a negative number, if x should appear before y in the sorted sequence
    • 0, if x equals y
    • a positive number, if x should appear after y in the sorted sequence

  • a number which is a bitwise OR of the following values:
    • 1 or Array.CASEINSENSITIVE
    • 2 or Array.DESCENDING
    • 4 or Array.UNIQUESORT
    • 8 or Array.RETURNINDEXEDARRAY
    • 16 or Array.NUMERIC

    If the value is 0, the sort works in the following way:

    • Sorting is case-sensitive (Z precedes a).
    • Sorting is ascending (a precedes b).
    • The array is modified to reflect the sort order; multiple elements that have identical sort fields are placed consecutively in the sorted array in no particular order.
    • All elements, regardless of data type, are sorted as if they were strings, so 100 precedes 99, because "1" is a lower string value than "9".

Parameters

sortBehavior:* — A Function or a Number value that determines the behavior of the sort. A Function parameter specifies a comparison method. A Number value specifies the sorting options.

Returns
Vector.<T> — A Vector object, with elements in the new order.

More examples

Related API Elements

splice

()method 
AS3 function splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T>

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Adds elements to and removes elements from the Vector. This method modifies the Vector without making a copy.

Note: To override this method in a subclass of Vector, use ...args for the parameters, as this example shows:

     public override function splice(...args) {
       // your statements here
     }
     

Parameters

startIndex:int — An integer that specifies the index of the element in the Vector where the insertion or deletion begins. You can use a negative integer to specify a position relative to the end of the Vector (for example, -1 for the last element of the Vector).
 
deleteCount:uint (default = 4294967295) — An integer that specifies the number of elements to be deleted. This number includes the element specified in the startIndex parameter. If the value is 0, no elements are deleted.
 
... items — An optional list of one or more comma-separated values to insert into the Vector at the position specified in the startIndex parameter.

Returns
Vector.<T> — a Vector containing the elements that were removed from the original Vector.

Throws
RangeError — If the startIndex and deleteCount arguments specify an index to be deleted that's outside the Vector's bounds.
 
RangeError — If this method is called while fixed is true and the splice() operation changes the length of the Vector.

More examples

toLocaleString

()method 
public function toLocaleString():String

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Returns a string that represents the elements in the specified Vector. Every element in the Vector, starting with index 0 and ending with the highest index, is converted to a concatenated string and separated by commas. In the ActionScript 3.0 implementation, this method returns the same value as the Vector.toString() method.

Returns
String — A string of Vector elements.

Related API Elements

toString

()method 
public function toString():String

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Returns a string that represents the elements in the Vector. Every element in the Vector, starting with index 0 and ending with the highest index, is converted to a concatenated string and separated by commas. To specify a custom separator, use the Vector.join() method.

Returns
String — A string of Vector elements.

More examples

Related API Elements

unshift

()method 
AS3 function unshift(... args):uint

Language Version: ActionScript 3.0
Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4

Adds one or more elements to the beginning of the Vector and returns the new length of the Vector. The other elements in the Vector are moved from their original position, i, to i + the number of new elements.

Because this function can accept multiple arguments, the data type of the arguments is not checked at compile time even in strict mode. However, if an argument is passed that is not an instance of the base type, an exception occurs at run time.

Parameters

... args — One or more instances of the base type of the Vector to be inserted at the beginning of the Vector.

Returns
uint — An integer representing the new length of the Vector.

Throws
TypeError — If any argument is not an instance of the base type T of the Vector.
 
RangeError — If this method is called while fixed is true.

More examples

Related API Elements