適用於 Adobe® Flash® Platform 的 ActionScript® 3.0 參考
首頁  |  隱藏套件和類別清單 |  套件  |  類別  |  新增內容  |  索引  |  附錄  |  為什麼顯示英文?
篩選: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隱藏篩選
最上層 

Vector  - AS3

套件x

最上層
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

語言元素

全域常數
全域函數
運算子
陳述式、關鍵字和指令
特殊類型

附錄

新增內容
編譯器錯誤
編譯器警告
執行階段錯誤
移轉至 ActionScript 3
支援的字元集
僅限 MXML 標籤
移動 XML 元素
Timed Text 標籤
不建議元素清單
AccessibilityImplementation 常數
如何使用 ActionScript 範例
法律聲明

類別 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
套件最上層
類別public dynamic class Vector
繼承Vector Inheritance Object

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

Vector 類別能讓您存取及操作向量 (即所有元素都具有相同資料類型的陣列)。Vector 的元素資料類型稱為 Vector 的「基底類型」。基底類型可以是任何類別,包括內建類別和自訂類別。在宣告 Vector 變數以及藉由呼叫類別建構函式建立實體時,可以指定基底類型。

如同 Array,您可以使用陣列存取 ([]) 運算子來設定或擷取 Vector 元素的值。許多 Vector 方法也提供用來設定及擷取元素值的機制。這些方法包括 push()pop()shift()unshift() 等等。Vector 物件的屬性和方法與 Array 的屬性和方法很類似 (在大部分情況下為完全相同)。在大部分的情況下,當您想要在資料類型相同的所有元素中使用 Array 時 ,最好是使用 Vector 實體。不過,Vector 實體是密集陣列,這意謂著它必須在每一個索引中有一個值 (或 null)。Array 實體沒有這種限制。

使用後置類型參數語法來指定 Vector 的基底類型。類型參數語法是由下列組成的序列:點 (.)、左方角括號 (<)、類別名稱,後面接著右方角括號 (>),如下列範例所示:

在範例的第一行中,變數 v 被宣告為 Vector.<String> 實體。換句話說,它代表只能保存 String 實體而且只能從中擷取 String 實體的 Vector (陣列)。第二行會建構相同 Vector 類型的實體 (亦即,其元素都是 String 物件的 Vector),並且將它指定給 v

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

使用 Vector.<T> 資料類型宣告的變數只能儲存以相同基底類型 T 建構的 Vector 實體。例如,藉由呼叫 new Vector.<String>() 建構的 Vector 不能指定給使用 Vector.<int> 資料類型宣告的變數。基底類型必須完全相符。例如,下列程式碼無法編譯,因為物件的基底類型與變數宣告的基底類型不同 (即使 Sprite 是 DisplayObject 的子類別):

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

若要將具有基底類型 T 的 Vector 轉換為 T 之父類別的 Vector,請使用 Vector() 全域函數。

除了資料類型限制之外,Vector 類別的其他限制與 Array 類別還是有所區別的:

  • Vector 是密集陣列。不同於只要在索引 0 和 7 有值 (即使在位置 1 至 6 沒有值) 的 Array,Vector 在每個索引都必須有值 (或 null)。
  • Vector 可以選擇性地成為固定長度,表示它所包含的元素數目不會變更。
  • 對 Vector 元素的存取會進行邊界檢查。您永遠都不能讀取大於最後一個元素 (length - 1) 之索引的值。您永遠都不能設定超出目前最後一個索引之索引的值 (換句話說,只能設定位於現有索引或索引 [length] 的值)。

由於這些限制,比起元素都是單一類別實體的 Array 實體,Vector 有三大優點:

  • 效能:使用 Vector 實體的陣列元素來存取和循環,遠比使用 Array 時快得多。
  • 類型安全:在嚴謹模式中,編譯器可以識別資料類型錯誤。資料類型錯誤範例包含指定具有不正確資料類型的值給 Vector,或者讀取來自 Vector 的值時,預期該值具有不正確的資料類型。但是請注意,當使用 push() 方法或 unshift() 方法將各個值加到 Vector 時,並不會在編譯階段檢查引數的資料類型。 相反地,會在執行階段時檢查它們。
  • 可靠性:與 Array 相比,執行階段範圍檢查 (或固定長度檢查) 會大幅增加可靠性。

相關 API 元素



公用屬性
 屬性定義自
 Inheritedconstructor : Object
類別物件的參照或是特定物件實體的建構函數。
Object
  fixed : Boolean
指出是否可以變更 Vector 的 length 屬性。
Vector
  length : uint
在 Vector 中可以使用的有效索引範圍。
Vector
公用方法
 方法定義自
  
Vector(length:uint = 0, fixed:Boolean = false)
建立具有指定基底類型的 Vector。
Vector
  
concat(... args):Vector.<T>
將參數清單中指定的 Vector 與這個 Vector 中的元素連接,並建立新的 Vector。
Vector
  
every(callback:Function, thisObject:Object = null):Boolean
針對 Vector 中的每個項目執行測試函數,直到到達針對指定之函數傳回 false 的項目為止。
Vector
  
filter(callback:Function, thisObject:Object = null):Vector.<T>
針對 Vector 中的每個項目執行測試函數,並傳回新的 Vector,其中包含針對指定之函數傳回 true 的所有項目。
Vector
  
forEach(callback:Function, thisObject:Object = null):void
針對 Vector 中的每個項目執行函數。
Vector
 Inherited
指出物件是否有已定義的指定屬性。
Object
  
indexOf(searchElement:T, fromIndex:int = 0):int
在 Vector 中搜尋某個項目,並傳回該項目的索引位置。
Vector
  
insertAt(index:int, element:T):void
將單一元素插入 Vector。
Vector
 Inherited
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。
Object
  
join(sep:String = ","):String
將 Vector 中的元素轉換成字串、在元素之間插入指定的分隔符號、連接元素,然後傳回結果字串。
Vector
  
lastIndexOf(searchElement:T, fromIndex:int = 0x7fffffff):int
在 Vector 中搜尋某個項目 (從指定的索引位置向後搜尋),並傳回符合之項目的索引位置。
Vector
  
map(callback:Function, thisObject:Object = null):Vector.<T>
針對 Vector 中的每個項目執行函數,並傳回新的 Vector,其中的項目會分別對應於針對此 Vector 中每個項目呼叫函數的結果。
Vector
  
pop():T
移除 Vector 中的最後一個元素,並傳回該元素。
Vector
 Inherited
指出指定的屬性是否存在,以及是否可列舉。
Object
  
push(... args):uint
在 Vector 結尾加入一個或多個元素,並傳回新的 Vector 長度。
Vector
  
removeAt(index:int):T
從 Vector 中移除單一元素。
Vector
  
將 Vector 中的元素順序反轉。
Vector
 Inherited
為迴圈作業設定動態屬性的可用性。
Object
  
shift():T
移除 Vector 中的第一個元素,並傳回該元素。
Vector
  
slice(startIndex:int = 0, endIndex:int = 16777215):Vector.<T>
傳回新的 Vector,此新 Vector 會包含原始 Vector 的元素範圍,但是不會修改原始 Vector。
Vector
  
some(callback:Function, thisObject:Object = null):Boolean
針對 Vector 中的每個項目執行測試函數,直到到達傳回 true 的項目為止。
Vector
  
sort(sortBehavior:*):Vector.<T>
排序 Vector 物件中的元素,同時傳回已排序的 Vector 物件。
Vector
  
splice(startIndex:int, deleteCount:uint = 4294967295, ... items):Vector.<T>
在 Vector 中增加和移除元素。
Vector
  
傳回字串,此字串代表指定之 Vector 中的元素。
Vector
  
傳回字串,此字串代表 Vector 中的元素。
Vector
  
在 Vector 開頭加入一個或多個元素,並傳回新的 Vector 長度。
Vector
 Inherited
會傳回指定之物件的基本值。
Object
屬性詳細資訊

fixed

屬性
fixed:Boolean

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

指出是否可以變更 Vector 的 length 屬性。如果此值為 true,則無法變更 length 屬性。這表示,當 fixedtrue 時不允許下列作業:

  • 直接設定 length 屬性
  • 將值指定給索引位置 length
  • 呼叫會變更 length 屬性的方法,包括:
    • pop()
    • push()
    • shift()
    • unshift()
    • splice() (如果 splice() 呼叫會變更 Vector 的 length)



實作
    public function get fixed():Boolean
    public function set fixed(value:Boolean):void

length

屬性 
length:uint

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 中可以使用的有效索引範圍。Vector 實體的索引位置多達 (不含) length 值。

每個 Vector 元素的值一定是基底類型的實體或 null。當 length 屬性的值設定為大於其先前值時,則會建立額外的元素並且將適合基底類型的預設值填入這些元素 (如果是參考類型則為 null)。

length 屬性的值設定為小於其先前值時,則會從 Vector 中移除位於索引位置大於或等於新 length 值的所有元素。



實作
    public function get length():uint
    public function set length(value:uint):void

擲回值
RangeError — 如果在 fixedtrue 時變更這個屬性。
 
RangeError — 如果這個屬性設定為大於允許的最大索引 (232) 的值。
建構函式詳細資料

Vector

()建構函式
public function Vector(length:uint = 0, fixed:Boolean = false)

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

建立具有指定基底類型的 Vector。

呼叫 Vector.<T>() 建構函式時,請使用類型參數語法來指定基底類型。類型參數語法是由下列組成的序列:點 (.)、左方角括號 (<)、類別名稱,後面接著右方角括號 (>),如下列範例所示:

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

若要從 Array 或另一個 Vector (如具有不同基底類型的 Vector) 建立 Vector 實體,請使用 Vector() 全域函數。

若要建立預先填入的 Vector 實體,請使用以下語法而不要使用以下指定的參數:

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

以下資訊適用於此語法:

  • Flash Professional CS5 和更新版本、Flash Builder 4 和更新版本以及 Flex 4 和更新版本支援此語法。
  • 可省略最後加上的逗點。
  • 不支援陣列中空白的項目;像 var v:Vector 陳述式。<int> = new <int>[0,,2,] 的陳述式會發生編譯器錯誤。
  • 您無法指定 Vector 實體的預設長度。相反地,長度會與初始化清單中的元素數目相同。
  • 您無法指定 Vector 實體是否為固定長度。但可使用 fixed 屬性。
  • 如果以值的形式所傳遞之項目不符合指定的類型,則可能會發生資料遺失或錯誤。例如:
  •      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
         

參數
length:uint (default = 0) — Vector 的初始長度 (元素數目)。如果這個參數大於零,則會建立指定的 Vector 元素數目並且將適合基底類型的預設值填入這些元素 (如果是參考類型則為 null)。
 
fixed:Boolean (default = false) — Vector 的長度是固定 (true) 還是可變更 (false)。也可以使用 fixed 屬性來設定此值。

相關 API 元素

方法詳細資訊

concat

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

將參數清單中指定的 Vector 與這個 Vector 中的元素連接,並建立新的 Vector。參數清單中的 Vector 必須具有與這個 Vector 相同的基底類型或子類型。如果您沒有傳遞任何參數,傳回的 Vector 便會是原始 Vector 的重製副本 (陰影副本)。

參數

... args — 基底類型的零個或多個 Vector,或這個 Vector 的子類型。

傳回值
Vector.<T> — 具有與這個 Vector 相同基底類型的 Vector,而且其中包含這個 Vector 的元素,後面接著參數清單中 Vector 的元素。

擲回值
TypeError — 如果任何引數不是基底類型的 Vector,或者無法轉換成基底類型的 Vector,就會傳回錯誤。

every

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

針對 Vector 中的每個項目執行測試函數,直到到達針對指定之函數傳回 false 的項目為止。您可以使用此方法,判斷 Vector 中的所有項目是否符合準則,如具有小於特定數字的值。

對於此方法而言,如果第一個參數 callback 是方法結束項,第二個參數 thisObject 就必須是 null。這是這個方法最常見的使用方式。

不過,假設您使用 Flash Professional,在主要時間軸的影格上建立函數,但要在不同的 this 內容中呼叫它:

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

假設您接著在名為 myVector 的 Vector 上使用 every() 方法:

    myVector.every(myFunction, someObject);
    

由於 myFunction 是 SWF 檔案主要類別的成員,不能在不同的 this 內容中執行。Flash 執行階段會在執行此程式碼時擲回例外。您可以將此函數指定給變數,以避免這項執行階段錯誤,如下所示:

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

參數

callback:Function — 要在 Vector 中針對每個項目執行的函數。這個函數會在使用三個引數的情況下叫用:Vector 中的目前項目、項目的索引和 Vector 物件:
function callback(item:T, index:int, vector:Vector.<T>):Boolean {
       // your code here
    }
    

回呼函數應傳回 Boolean 值。

 
thisObject:Object (default = null) — 呼叫函數時回呼函數中的識別項 this 參考的物件。

傳回值
Boolean — 如果指定的函數傳回 true,則傳回 Boolean 值 true,否則傳回 false

相關 API 元素

filter

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

針對 Vector 中的每個項目執行測試函數,並傳回新的 Vector,其中包含針對指定之函數傳回 true 的所有項目。如果某個項目傳回 false,則新的 Vector 中不會包括該項目。所傳回之 Vector 的基底類型符合在其上呼叫方法之 Vector 的基底類型。

對於此方法而言,如果第一個參數 callback 是方法結束項,第二個參數 thisObject 就必須是 null。這是這個方法最常見的使用方式。

不過,假設您使用 Flash Professional,在主要時間軸的影格上建立函數,但要在不同的 this 內容中呼叫它:

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

假設您接著在名為 myVector 的 Vector 上使用 filter() 方法:

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

由於 myFunction 是 SWF 檔案主要類別的成員,不能在不同的 this 內容中執行。Flash 執行階段會在執行此程式碼時擲回例外。您可以將此函數指定給變數,以避免這項執行階段錯誤,如下所示:

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

參數

callback:Function — 要在 Vector 中針對每個項目執行的函數。這個函數會在使用三個引數的情況下叫用:Vector 中的目前項目、項目的索引和 Vector 物件:
function callback(item:T, index:int, vector:Vector.<T>):Boolean;
 
thisObject:Object (default = null) — 呼叫函數時回呼函數中的識別項 this 參考的物件。

傳回值
Vector.<T> — 新 Vector,其中包含在原始 Vector 中 callback 函數傳回 true 的所有項目。

相關 API 元素

forEach

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

針對 Vector 中的每個項目執行函數。

對於此方法而言,如果第一個參數 callback 是方法結束項,第二個參數 thisObject 就必須是 null。這是這個方法最常見的使用方式。

不過,假設您使用 Flash Professional,在主要時間軸的影格上建立函數,但要在不同的 this 內容中呼叫它:

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

假設您接著在名為 myVector 的 Vector 上使用 forEach() 方法:

     myVector.forEach(myFunction, someObject);
     

由於 myFunction 是 SWF 檔案主要類別的成員,不能在不同的 this 內容中執行。Flash 執行階段會在執行此程式碼時擲回例外。您可以將此函數指定給變數,以避免這項執行階段錯誤,如下所示:

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

參數

callback:Function — 要在 Vector 中針對每個項目執行的函數。這個函數會在使用三個引數的情況下叫用:Vector 中的目前項目、項目的索引和 Vector 物件:
function callback(item:T, index:int, vector:Vector.<T>):void;

函數呼叫的任何傳回值都會被捨棄。

 
thisObject:Object (default = null) — 呼叫函數時回呼函數中的識別項 this 參考的物件。

indexOf

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 中搜尋某個項目,並傳回該項目的索引位置。項目與 Vector 元素是使用嚴謹相等 (===) 來比較。

參數

searchElement:T — 要在 Vector 中尋找的項目。
 
fromIndex:int (default = 0) — 要在 Vector 中開始搜尋項目的位置。如果這個參數為負值,則會被視為 length + fromIndex,表示從結尾倒數第 -fromIndex 個項目的位置開始搜尋,並且從該位置向前搜尋直到 Vector 的結尾。

傳回值
int — 此項目在 Vector 中的索引位置 (從零開始)。如果找不到 searchElement 引數,傳回值會是 -1。

相關 API 元素

insertAt

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 19, AIR 19

將單一元素插入 Vector。這個方法會修改 Vector,但是不會製作副本。

參數

index:int — 整數,指定 Vector 中要插入元素的位置。您可以使用負整數,指定相對於 Vector 結尾的位置 (例如,-1 是 Vector 的最後一個元素)。
 
element:T


擲回值
RangeError — 如果在 fixedtrue 時呼叫這個方法。

join

()方法 
AS3 function join(sep:String = ","):String

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

將 Vector 中的元素轉換成字串、在元素之間插入指定的分隔符號、連接元素,然後傳回結果字串。巢狀的 Vector 永遠是用逗號 (,) 來分隔,而不是用傳遞給 join() 方法的分隔符號來分隔。

參數

sep:String (default = ",") — 在傳回的字串中分隔 Vector 元素的字元或字串。如果省略這個參數,便會使用逗號做為預設分隔符號。

傳回值
String — 字串,由轉換成字串的 Vector 元素組成,並以指定的字串分隔。

相關 API 元素

lastIndexOf

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 中搜尋某個項目 (從指定的索引位置向後搜尋),並傳回符合之項目的索引位置。項目與 Vector 元素是使用嚴謹相等 (===) 來比較。

參數

searchElement:T — 要在 Vector 中尋找的項目。
 
fromIndex:int (default = 0x7fffffff) — 要在 Vector 中開始搜尋項目的位置。預設為允許的最大索引值,表示從 Vector 中的最後一個項目開始搜尋。

如果這個參數為負值,則會被視為 length + fromIndex,表示從結尾倒數第 -fromIndex 個項目的位置開始搜尋,並且從該位置向後搜尋直到索引 0。

傳回值
int — 此項目在 Vector 中的索引位置 (從零開始)。如果找不到 searchElement 引數,傳回值會是 -1。

相關 API 元素

map

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

針對 Vector 中的每個項目執行函數,並傳回新的 Vector,其中的項目會分別對應於針對此 Vector 中每個項目呼叫函數的結果。結果 Vector 有與原始 Vector 相同的基底類型和 length。結果 Vector 中位於索引 i 的元素就是針對原始 Vector 中位於索引 i 的元素呼叫函數所產生的結果。

對於此方法而言,如果第一個參數 callback 是方法結束項,第二個參數 thisObject 就必須是 null。這是這個方法最常見的使用方式。

不過,假設您使用 Flash Professional,在主要時間軸的影格上建立函數,但要在不同的 this 內容中呼叫它:

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

假設您接著在名為 myVector 的 Vector 上使用 map() 方法:

     myVector.map(myFunction, someObject);
     

由於 myFunction 是 SWF 檔案主要類別的成員,不能在不同的 this 內容中執行。Flash 執行階段會在執行此程式碼時擲回例外。您可以將此函數指定給變數,以避免這項執行階段錯誤,如下所示:

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

參數

callback:Function — 要在 Vector 中針對每個項目執行的函數。這個函數會在使用三個引數的情況下叫用:Vector 中的目前項目、項目的索引和 Vector 物件:
function callback(item:T, index:int, vector:Vector.<T>):T;
 
thisObject:Object (default = null) — 呼叫函數時回呼函數中的識別項 this 參考的物件。

傳回值
Vector.<T> — 新 Vector,其中包含針對此 Vector 中每個項目呼叫函數的結果。結果 Vector 有與原始 Vector 相同的基底類型和 length

相關 API 元素

pop

()方法 
AS3 function pop():T

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

移除 Vector 中的最後一個元素,並傳回該元素。呼叫這個函數時,Vector 的 length 屬性會減掉一。

傳回值
T — 指定的 Vector 中最後一個元素的值。

擲回值
RangeError — 如果在 fixedtrue 時呼叫這個方法。

相關 API 元素

push

()方法 
AS3 function push(... args):uint

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 結尾加入一個或多個元素,並傳回新的 Vector 長度。

因為這個函數可以接受多個引數,所以即使在嚴謹模式中,也不會於編譯階段檢查引數的資料類型。但若傳遞的引數不是基底類型的實體,則會在執行階段發生例外。

參數

... args — 要附加至 Vector 的一個或多個值。

傳回值
uint — Vector 在加入新元素之後的長度。

擲回值
TypeError — 如果任何引數不是 Vector 之基底類型 T 的實體。
 
RangeError — 如果在 fixedtrue 時呼叫這個方法。

相關 API 元素

removeAt

()方法 
AS3 function removeAt(index:int):T

語言版本: ActionScript 3.0
執行階段版本: Flash Player 19, AIR 19

從 Vector 中移除單一元素。這個方法會修改 Vector,但是不會製作副本。

參數

index:int — 整數,用以指定 Vector 中要刪除之元素的索引。您可以使用負整數,指定相對於 Vector 結尾的位置 (例如,-1 是 Vector 的最後一個元素)。

傳回值
T — 要從原始 Vector 中移除的元素。

擲回值
RangeError — 如果 index 引數指定要刪除的索引超出 Vector 的邊界。
 
RangeError — 如果在 fixedtrue 時呼叫這個方法。

reverse

()方法 
AS3 function reverse():Vector.<T>

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

將 Vector 中的元素順序反轉。這個方法會變更在其上呼叫的 Vector。

傳回值
Vector.<T> — 具有反向元素的 Vector。

shift

()方法 
AS3 function shift():T

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

移除 Vector 中的第一個元素,並傳回該元素。剩餘的 Vector 元素會從其原始位置 i 移到 i - 1。

傳回值
T — Vector 中的第一個元素。

擲回值
RangeError — 如果 fixedtrue

相關 API 元素

slice

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

傳回新的 Vector,此新 Vector 會包含原始 Vector 的元素範圍,但是不會修改原始 Vector。傳回的 Vector 包含 startIndex 元素及其後的所有元素,但是不包含 endIndex 元素。

如果您沒有傳遞任何參數,新的 Vector 便會是原始 Vector 的重製副本 (陰影副本)。如果您對這兩個參數傳遞 0 值,則會建立與原始 Vector 相同類型的新空白 Vector。

參數

startIndex:int (default = 0) — 數字,指定片段開始點的索引。 如果 startIndex 為負值,表示起點是從 Vector 的結尾開始,而 -1 就是指最後一個元素。
 
endIndex:int (default = 16777215) — 數字,指定片段結束點的索引。 如果您省略這個參數,這個片段就會包含從 Vector 起點到 Vector 結尾的所有元素。如果 endIndex 為負值,表示指定的終點是在 Vector 的結尾,而 -1 就是指最後一個元素。

傳回值
Vector.<T> — 由原始 Vector 中的元素範圍組成的 Vector。

some

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

針對 Vector 中的每個項目執行測試函數,直到到達傳回 true 的項目為止。您可以使用此方法,判斷 Vector 中的所有項目是否符合準則,如具有小於特定數字的值。

對於此方法而言,如果第一個參數 callback 是方法結束項,第二個參數 thisObject 就必須是 null。這是這個方法最常見的使用方式。

不過,假設您在主要時間軸的影格上建立函數,但要在不同的 this 內容中呼叫它:

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

假設您接著在名為 myVector 的 Vector 上使用 some() 方法:

     myVector.some(myFunction, someObject);
     

由於 myFunction 是 SWF 檔案主要類別的成員,不能在不同的 this 內容中執行。Flash 執行階段會在執行此程式碼時擲回例外。您可以將此函數指定給變數,以避免這項執行階段錯誤,如下所示:

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

參數

callback:Function — 要在 Vector 中針對每個項目執行的函數。這個函數會在使用三個引數的情況下叫用:Vector 中的目前項目、項目的索引和 Vector 物件:
function callback(item:T, index:int, vector:Vector.<T>):Boolean

回呼函數應傳回 Boolean 值。

 
thisObject:Object (default = null) — 呼叫函數時回呼函數中的識別項 this 參考的物件。

傳回值
Boolean — 如果 Vector 中有任何項目針對指定的函數傳回 true,則傳回 Boolean 值 true,否則傳回 false

相關 API 元素

sort

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

排序 Vector 物件中的元素,同時傳回已排序的 Vector 物件。這個方法會根據參數 sortBehavior 進行排序,該參數可能是比較兩個值的函數,或是一組排序選項。

方法會使用一個參數。參數為下列其中一項:

  • 函數,使用 Vector 之基底類型 (T) 的兩個引數,並且傳回一個數字:
    function compare(x:T, y:T):Number {}

    函數的邏輯是,指定兩個元素 xy 時,此函數會傳回下列三個值的其中一項:

    • 如果 x 在排序序列中應出現在 y 的前面,其值為負值
    • 如果 x 等於 y,其值為 0
    • 如果 x 在排序序列中應出現在 y 的後面,其值為正值

  • 屬於下列值的位元 OR 的數字:
    • 1 或 Array.CASEINSENSITIVE
    • 2 或 Array.DESCENDING
    • 4 或 Array.UNIQUESORT
    • 8 或 Array.RETURNINDEXEDARRAY
    • 16 或 Array.NUMERIC

    如果值為 0,則排序會以下列方式運作:

    • 排序動作有區分大小寫 (Z 位於 a 之前)。
    • 以遞增方式排序 (a 位於 b 之前)。
    • 陣列會遭到修改,以反映出排序順序;具有相同排序欄位的多個元素會被連續置於排序陣列中 (不會依照特定順序)。
    • 所有的元素,無論屬於何種資料類型,都會如字串般排序。所以 100 會在 99 之前,因為 "1" 是比 "9" 低的字串值。

參數

sortBehavior:*FunctionNumber 值,決定排序的行為。Function 參數會指定比較方法。Number 值會指定排序選項。

傳回值
Vector.<T> — Vector 物件,並且依照新順序排序元素。

相關 API 元素

splice

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

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 中增加和移除元素。這個方法會修改 Vector,但是不會製作副本。

注意:若要在 Vector 的子類別中覆寫此方法,請使用 ...args 做為參數,如下列範例所示:

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

參數

startIndex:int — 整數,指定 Vector 中插入或刪除開始位置之元素的索引。您可以使用負整數,指定相對於 Vector 結尾的位置 (例如,-1 是 Vector 的最後一個元素)。
 
deleteCount:uint (default = 4294967295) — 整數,指定要刪除的元素數目。 這個數字會包含 startIndex 參數中所指定的元素。 如果這個值為 0,則不會刪除任何元素。
 
... items — 含有一個或多個逗號分隔值的選擇性清單,以便將其插入此 Vector 中 startIndex 參數所指定的位置。

傳回值
Vector.<T> — Vector,其中包含從原始 Vector 中移除的元素。

擲回值
RangeError — 如果 startIndexdeleteCount 引數指定要刪除的索引超出 Vector 的邊界。
 
RangeError — 如果在 fixedtrue 而且 splice() 作業變更了 Vector 的length 時呼叫這個方法。

toLocaleString

()方法 
public function toLocaleString():String

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

傳回字串,此字串代表指定之 Vector 中的元素。Vector 中的每一個元素 (從索引 0 開始,到最後的索引為止) 都會轉換成以逗號分隔的連接字串。在 ActionScript 3.0 實作中,此方法會傳回與 Vector.toString() 方法相同的值。

傳回值
String — Vector 元素的字串。

相關 API 元素

toString

()方法 
public function toString():String

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

傳回字串,此字串代表 Vector 中的元素。Vector 中的每一個元素 (從索引 0 開始,到最後的索引為止) 都會轉換成以逗號分隔的連接字串。若要指定自訂的分隔符號,請使用 Vector.join() 方法。

傳回值
String — Vector 元素的字串。

相關 API 元素

unshift

()方法 
AS3 function unshift(... args):uint

語言版本: ActionScript 3.0
執行階段版本: Flash Player 10, AIR 1.5, Flash Lite 4

在 Vector 開頭加入一個或多個元素,並傳回新的 Vector 長度。Vector 中的其他元素會從其原始位置 i 移到 i + 新元素數目的位置。

因為這個函數可以接受多個引數,所以即使在嚴謹模式中,也不會於編譯階段檢查引數的資料類型。但若傳遞的引數不是基底類型的實體,則會在執行階段發生例外。

參數

... args — Vector 基底類型要在 Vector 開頭插入的一個或多個實體。

傳回值
uint — 整數,代表 Vector 的新長度。

擲回值
TypeError — 如果任何引數不是 Vector 之基底類型 T 的實體。
 
RangeError — 如果在 fixedtrue 時呼叫這個方法。

相關 API 元素





[ X ]為什麼顯示英文?
「ActionScript 3.0 參考」的內容是以英文顯示

並非所有「ActionScript 3.0 參考」的內容都翻譯為所有語言。當語言元素未翻譯時,就會以英文顯示。例如,ga.controls.HelpBox 類別並沒有翻譯為任何語言。因此在參考的繁體中文版本中,ga.controls.HelpBox 類別就會以英文顯示。