用于 Adobe® Flash® Platform 的 ActionScript® 3.0 参考
主页  |  隐藏包列表和类列表 |   |   |  新增内容  |  索引  |  附录  |  为什么显示为英语?
过滤条件: AIR 30.0 和更早版本, Flash Player 30.0 和更早版本, Flash Lite 4
Flex 4.6 和更早版本, Flash Pro CS6 和更早版本
隐藏过滤条件
spark.primitives 

BitmapImage  - AS3 Flex

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 的标签
Motion XML 元素
Timed Text 标记
不推荐使用的元素的列表
AccessibilityImplementation 常量
如何使用 ActionScript 示例
法律声明
spark.primitives
public class BitmapImage
继承BitmapImage Inheritance GraphicElement Inheritance EventDispatcher Inheritance Object

语言版本: ActionScript 3.0
产品版本: Flex 4.0
运行时版本: Flash Player 10, AIR 2.0

BitmapImage 元素在其父元素的坐标空间内定义一个矩形区域,使用从源文件或源 URL 获取的位图数据填充。

查看示例



公共属性
 属性由以下参数定义
 Inheritedalpha : Number
图形元素的透明度级别。
GraphicElement
 InheritedalwaysCreateDisplayObject : Boolean
指定此 GraphicElement 是否与其 DisplayObject 相关联,并呈示于 DisplayObject。
GraphicElement
 Inheritedbaseline : Object
从锚点目标到控件的基线位置的垂直距离(以像素为单位)。
GraphicElement
 InheritedbaselinePosition : Number
[只读] 组件第一行文本的基线的 y 坐标。
GraphicElement
  bitmapData : BitmapData
[只读] 返回 BitmapData 对象的副本,该对象表示当前加载的图像内容(未缩放)。
BitmapImage
 InheritedblendMode : String
BlendMode 类中的一个值,用于指定要使用的混合模式。
GraphicElement
 Inheritedbottom : Object
从组件的下边缘到锚点目标的下边缘的垂直距离(以像素为单位)。
GraphicElement
  bytesLoaded : Number
[只读] 已加载的图像的字节数。
BitmapImage
  bytesTotal : Number
[只读] 已加载的或待加载的总图像数据(以字节为单位)。
BitmapImage
  clearOnLoad : Boolean
指示是否在加载新内容之前清除以前的图像内容。
BitmapImage
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
  contentLoader : IContentLoader
可选自定义图像加载器(即
BitmapImage
  contentLoaderGrouping : String
要传递给相关联的 IContentLoader 实例的 load() 方法的可选内容分组标识符。
BitmapImage
 Inheriteddepth : Number
确定容器内各项目的呈示顺序。
GraphicElement
 InheriteddesignLayer : DesignLayer
指定与该可视元素关联的可选 DesignLayer 实例。
GraphicElement
 InheriteddisplayObject : DisplayObject
[只读] 绘制此 IGraphicElement 所在的共享 DisplayObject。
GraphicElement
 InheriteddisplayObjectSharingMode : String
指示此 IGraphicElement 与其显示对象之间的关联。
GraphicElement
 InheritedexplicitHeight : Number
指定该组件在组件坐标中显式高度(以像素为单位)的数字。
GraphicElement
 InheritedexplicitMaxHeight : Number
布局过程中父级要考虑的组件最大建议高度。
GraphicElement
 InheritedexplicitMaxWidth : Number
布局过程中父级要考虑的组件最大建议宽度。
GraphicElement
 InheritedexplicitMinHeight : Number
布局过程中父级要考虑的组件最小建议高度。
GraphicElement
 InheritedexplicitMinWidth : Number
布局过程中父级要考虑的组件最小建议宽度。
GraphicElement
 InheritedexplicitWidth : Number
指定该组件在组件坐标中显式宽度(以像素为单位)的数字。
GraphicElement
  fillMode : String
确定位图填充尺寸的方式。
BitmapImage
 Inheritedfilters : Array
包含当前与图形元素关联的每个滤镜对象的索引数组。
GraphicElement
 InheritedhasLayoutMatrix3D : Boolean
[只读] 如果元素具有 3D 矩阵,则为 true。
GraphicElement
 Inheritedheight : Number
图形元素的高度。
GraphicElement
  horizontalAlign : String
当内容的高宽比不是 1:1 且 scaleMode 设置为 mx.graphics.BitmapScaleMode.LETTERBOX 时,内容的水平对齐方式。
BitmapImage
 InheritedhorizontalCenter : Object
从组件中心到锚点目标的内容区域中心的水平距离(以像素为单位)。
GraphicElement
 Inheritedid : String
组件的标识。
GraphicElement
 InheritedincludeInLayout : Boolean
指定此元素是否包含在父代的布局中。
GraphicElement
 Inheritedis3D : Boolean
[只读] 当元素为 3D 时,则为 true。
GraphicElement
 InheritedlayoutDirection : String
指定元素的所需布局方向:LayoutDirection.LTR(从左到右)、LayoutDirection.RTL(从右到左)或 null(继承)。
GraphicElement
 Inheritedleft : Object
从组件的左边缘到锚点目标的左边缘的水平距离(以像素为单位)。
GraphicElement
 InheritedluminosityClip : Boolean
控制发光度遮罩是否剪辑设置了遮罩的内容的属性。
GraphicElement
 InheritedluminosityInvert : Boolean
控制计算由发光度遮罩设置遮罩的图形元素的 RGB 颜色值的属性。
GraphicElement
 Inheritedmask : DisplayObject
调用显示对象被指定的 mask 对象遮罩。
GraphicElement
 InheritedmaskType : String
定义将遮罩应用到 GraphicElement 的方式。可能的值为 MaskType.CLIP、MaskType.ALPHA 和 MaskType.LUMINOSITY。剪辑遮罩 - 遮罩处于剪辑模式下时,会将剪辑遮罩减少至 1 位。
GraphicElement
 InheritedmaxHeight : Number
布局过程中父级要考虑的组件最大建议高度。
GraphicElement
 InheritedmaxWidth : Number
布局过程中父级要考虑的组件最大建议宽度。
GraphicElement
 InheritedmeasuredHeight : Number
组件的默认高度(以像素为单位)。
GraphicElement
 InheritedmeasuredWidth : Number
组件的默认宽度(以像素为单位)。
GraphicElement
 InheritedmeasuredX : Number
相对于元素的原点的默认测量界限左上角。
GraphicElement
 InheritedmeasuredY : Number
相对于元素的原点的默认测量界限左上角。
GraphicElement
 InheritedminHeight : Number
布局过程中父级要考虑的组件最小建议高度。
GraphicElement
 InheritedminWidth : Number
布局过程中父级要考虑的组件最小建议宽度。
GraphicElement
 Inheritedowner : DisplayObjectContainer
此 IVisualElement 对象的所有者。
GraphicElement
 Inheritedparent : DisplayObjectContainer
[只读] 此组件的父容器或组件。
GraphicElement
 InheritedpercentHeight : Number
以组件父代大小百分比的方式指定组件高度。
GraphicElement
 InheritedpercentWidth : Number
以组件父代大小百分比的方式指定组件宽度。
GraphicElement
 InheritedpostLayoutTransformOffsets : mx.geom:TransformOffsets
定义能够应用于对象转换且在一定程度上对其父布局不可视的一组调整。
GraphicElement
  preliminaryHeight : Number
当布局请求图像的“测量”范围,但图像数据尚未完成加载时,提供要使用的高度的估计值。
BitmapImage
  preliminaryWidth : Number
当布局请求图像的“测量”范围,但图像数据尚未完成加载时,提供要使用的宽度的估计值。
BitmapImage
 Inheritedright : Object
从组件的右边缘到锚点目标的右边缘的水平距离(以像素为单位)。
GraphicElement
 Inheritedrotation : Number
指示元素从转换点的旋转(以度为单位)。
GraphicElement
 InheritedrotationX : Number
指示 element 实例相对于 3D 父容器距离其原始方向的 x 轴旋转(以度为单位)。
GraphicElement
 InheritedrotationY : Number
表示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 y 轴旋转(以度为单位)。
GraphicElement
 InheritedrotationZ : Number
指示元素从转换点的旋转(以度为单位)。
GraphicElement
  scaleMode : String
确定当 fillMode 设置为 mx.graphics.BitmapFillMode.SCALE 时如何缩放图像。
BitmapImage
 InheritedscaleX : Number
从转换点开始应用的元素的水平缩放比例(百分比)。
GraphicElement
 InheritedscaleY : Number
从转换点开始应用的元素的垂直缩放比例(百分比)。
GraphicElement
 InheritedscaleZ : Number
从转换点开始应用的元素的 z 缩放比例(百分比)。
GraphicElement
  smooth : Boolean
指定是否将平滑处理算法应用于位图图像。
BitmapImage
  smoothingQuality : String
确定如何缩小图像。
BitmapImage
  source : Object
用于位图填充的源。
BitmapImage
  sourceHeight : Number
[只读] 提供原始图像数据的未缩放高度。
BitmapImage
  sourceWidth : Number
[只读] 提供原始图像数据的未缩放宽度。
BitmapImage
 Inheritedtop : Object
从组件的上边缘到锚点目标的上边缘的垂直距离(以像素为单位)。
GraphicElement
 Inheritedtransform : flash.geom:Transform
一个对象,具有与显示对象的矩阵、颜色转换和像素范围有关的属性。
GraphicElement
 InheritedtransformX : Number
元素的 x 位置转换点。
GraphicElement
 InheritedtransformY : Number
元素的 y 位置转换点。
GraphicElement
 InheritedtransformZ : Number
元素的 z 位置转换点。
GraphicElement
  trustedSource : Boolean
[只读] 一个只读标志,指示是否将当前加载的内容视为是从其安全策略允许跨域图像访问的源加载的。
BitmapImage
  verticalAlign : String
当内容的高宽比不是 1:1 且 scaleMode 设置为 mx.graphics.BitmapScaleMode.LETTERBOX 时,内容的垂直对齐方式。
BitmapImage
 InheritedverticalCenter : Object
从组件中心到锚点目标的内容区域中心的垂直距离(以像素为单位)。
GraphicElement
 Inheritedvisible : Boolean
控制此可视元素的可见性。
GraphicElement
 Inheritedwidth : Number
图形元素的宽度。
GraphicElement
 Inheritedx : Number
图形元素的 x 位置。
GraphicElement
 Inheritedy : Number
图形元素的 y 位置。
GraphicElement
 Inheritedz : Number
图形元素的 z 位置。
GraphicElement
受保护的属性
 属性由以下参数定义
 InheriteddrawnDisplayObject : DisplayObject
[只读] GraphicElement 在其中绘制的实际 DisplayObject。
GraphicElement
 InheriteddrawX : Number
[只读] 应该绘制元素的 x 位置。
GraphicElement
 InheriteddrawY : Number
[只读] 应该绘制元素的 y 位置。
GraphicElement
 InheritedhasComplexLayoutMatrix : Boolean
[只读] 如果 GraphicElement 具有任何非平移 (x,y) 转换属性,则返回 true。
GraphicElement
 InheritedlayoutFeatures : AdvancedLayoutFeatures
包含 GraphicElement 实现转换和分层支持的方法的所有实现细节。
GraphicElement
 InheritedneedsDisplayObject : Boolean
[只读] 如果元素需要一个独占 DisplayObject,则为 true。
GraphicElement
公共方法
 方法由以下参数定义
  
构造函数。
BitmapImage
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
如果此 IGraphicElement 是兼容的且可以与序列中下一个 IGraphicElement 共享显示对象,则返回 true。
GraphicElement
 Inherited
如果此 IGraphicElement 是兼容的且可以与序列中上一个 IGraphicElement 共享显示对象,则返回 true。
GraphicElement
 Inherited
创建一个新 DisplayObject 以用于绘制此 IGraphicElement。
GraphicElement
 Inherited
将事件调度到事件流中。
EventDispatcher
 Inherited
getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
按指定的元素大小,返回元素边界的 x 坐标。
GraphicElement
 Inherited
getBoundsYAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
按指定的元素大小,返回元素边界的 y 坐标。
GraphicElement
 Inherited
getLayoutBoundsHeight(postLayoutTransform:Boolean = true):Number
返回元素的布局高度。
GraphicElement
 Inherited
getLayoutBoundsWidth(postLayoutTransform:Boolean = true):Number
返回元素的布局宽度。
GraphicElement
 Inherited
getLayoutBoundsX(postLayoutTransform:Boolean = true):Number
返回元素在屏幕上进行绘制时所用的 x 坐标。
GraphicElement
 Inherited
getLayoutBoundsY(postLayoutTransform:Boolean = true):Number
返回元素在屏幕上进行绘制时所用的 y 坐标。
GraphicElement
 Inherited
返回用于相对于其同级组件计算组件的布局的转换矩阵。
GraphicElement
 Inherited
返回此元素的布局转换 Matrix3D。
GraphicElement
 Inherited
getMaxBoundsHeight(postLayoutTransform:Boolean = true):Number
返回元素的最大高度。
GraphicElement
 Inherited
getMaxBoundsWidth(postLayoutTransform:Boolean = true):Number
返回元素的最大宽度。
GraphicElement
 Inherited
getMinBoundsHeight(postLayoutTransform:Boolean = true):Number
返回元素的最小高度。
GraphicElement
 Inherited
getMinBoundsWidth(postLayoutTransform:Boolean = true):Number
返回元素的最小宽度。
GraphicElement
 Inherited
getPreferredBoundsHeight(postLayoutTransform:Boolean = true):Number
返回元素的首选高度。
GraphicElement
 Inherited
getPreferredBoundsWidth(postLayoutTransform:Boolean = true):Number
返回元素的首选宽度。
GraphicElement
 Inherited
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
表示对象是否已经定义了指定的属性。
Object
 Inherited
如果 GraphicElement 是使用 MXML 标签创建的,则由 MXML 编译器自动调用。
GraphicElement
 Inherited
调用此方法将导致在呈示显示列表前调用元素的 validateDisplayList() 方法。
GraphicElement
 Inherited
当某元素的 layoutDirection 更改或其父代的 layoutDirection 更改时,该元素必须调用该方法。
GraphicElement
 Inherited
调用此方法将导致在呈示显示列表前调用元素的 validateProperties() 方法。
GraphicElement
 Inherited
调用此方法将导致在呈示显示列表前调用元素的 validateSize() 方法。
GraphicElement
 Inherited
表示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
 Inherited
将 Point 对象从对象的(局部)坐标转换为舞台(全局)坐标。
GraphicElement
 Inherited
将 IGraphicElement 添加到主机组件或从主机组件将其删除时由 IGraphicElementContainer 调用。
GraphicElement
 Inherited
表示指定的属性是否存在、是否可枚举。
Object
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
setLayoutBoundsPosition(newBoundsX:Number, newBoundsY:Number, postLayoutTransform:Boolean = true):void
设置元素在屏幕上进行绘制时所用的坐标。
GraphicElement
 Inherited
setLayoutBoundsSize(width:Number, height:Number, postLayoutTransform:Boolean = true):void
设置元素的布局大小。
GraphicElement
 Inherited
setLayoutMatrix(value:Matrix, invalidateLayout:Boolean):void
设置用于相对于其同级组件计算组件的布局大小和位置的转换 Matrix。
GraphicElement
 Inherited
setLayoutMatrix3D(value:Matrix3D, invalidateLayout:Boolean):void
设置用于计算组件相对于其同级组件的布局大小和位置的转换 Matrix3D。
GraphicElement
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
确定此元素是否可以将它自己绘制到该序列的 sharedDisplayObject。
GraphicElement
 Inherited
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
 Inherited
transformAround(transformCenter:Vector3D, scale:Vector3D = null, rotation:Vector3D = null, translation:Vector3D = null, postLayoutScale:Vector3D = null, postLayoutRotation:Vector3D = null, postLayoutTranslation:Vector3D = null, invalidateLayout:Boolean = true):void
用于更新转换的旋转、缩放和平移的一种实用程序方法,同时保留某个特定点,该点是在组件自己的坐标空间中指定的,且在父项的坐标空间中是固定的。
GraphicElement
 Inherited
transformPointToParent(localPosition:Vector3D, position:Vector3D, postLayoutPosition:Vector3D):void
一种实用程序方法,用于将以该对象的本地坐标指定的点转换为在该对象父坐标中的相应位置。
GraphicElement
 Inherited
由 IGraphicElementContainer 调用以在其 displayObject 属性中重新绘制此元素。
GraphicElement
 Inherited
根据需要,通过立即调用 validateProperties()、validateSize() 和 validateDisplayList() 来验证并更新此对象的属性和布局。
GraphicElement
 Inherited
由布局逻辑用于通过调用 commitProperties() 方法来验证组件的属性。
GraphicElement
 Inherited
由 IGraphicElementContainer 调用以验证此元素的大小。
GraphicElement
 Inherited
返回指定对象的原始值。
Object
 Inherited
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。
EventDispatcher
受保护的方法
 方法由以下参数定义
 Inherited
确定是否可以跳过对 measure() 方法的调用。
GraphicElement
  
[覆盖] 处理在元素上设置的属性。
BitmapImage
 Inherited
getStrokeExtents(postLayoutTransform:Boolean = true):Rectangle
返回元素界限每一侧上的笔触所占据的像素数。
GraphicElement
 Inherited
通知主机此元素已更改且需要更新其图层的实用程序方法。
GraphicElement
 Inherited
此对象影响其布局时(includeInLayout 为 true),使父代大小和显示列表失效的 Helper 方法。
GraphicElement
  
[覆盖] 计算元素的默认大小。
BitmapImage
 Inherited
用于 ILayoutElement 接口的实现,返回显式度量的高度预转换。
GraphicElement
 Inherited
用于 ILayoutElement 接口的实现,返回测量宽度预转换的显式。
GraphicElement
 Inherited
transformHeightForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
转换元素的大小。
GraphicElement
 Inherited
transformWidthForLayout(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
转换元素的大小。
GraphicElement
  
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
[覆盖] 绘制元素和/或调整其内容的大小并定位该内容。
BitmapImage
事件
 事件 摘要 由以下参数定义
 Inherited[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。EventDispatcher
  在内容加载完成时调度。BitmapImage
 Inherited[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。EventDispatcher
  在通过 HTTP 发出网络请求并且 Flash Player 或 AIR 可以检测到 HTTP 状态代码时调度。BitmapImage
  发生输入/输出错误时调度。BitmapImage
  当加载内容时调度。BitmapImage
  在内容加载完成时调度。BitmapImage
  发生安全性错误时调度。BitmapImage
属性详细信息

bitmapData

属性
bitmapData:BitmapData  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

返回 BitmapData 对象的副本,该对象表示当前加载的图像内容(未缩放)。对于不受信任的跨域内容,此属性为 null

默认值为 null。



实现
    public function get bitmapData():BitmapData

bytesLoaded

属性 
bytesLoaded:Number  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

已加载的图像的字节数。仅与由请求 URL 加载的图像相关。

默认值为 NaN。



实现
    public function get bytesLoaded():Number

bytesTotal

属性 
bytesTotal:Number  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

已加载的或待加载的总图像数据(以字节为单位)。仅与由请求 URL 加载的图像相关。

默认值为 NaN。



实现
    public function get bytesTotal():Number

clearOnLoad

属性 
clearOnLoad:Boolean

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

指示是否在加载新内容之前清除以前的图像内容。

默认值为 true。



实现
    public function get clearOnLoad():Boolean
    public function set clearOnLoad(value:Boolean):void

contentLoader

属性 
contentLoader:IContentLoader

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

要与内容加载器客户端相关联的可选自定义图像加载器(即图像缓存或排队)。

默认值为 null。



实现
    public function get contentLoader():IContentLoader
    public function set contentLoader(value:IContentLoader):void

contentLoaderGrouping

属性 
contentLoaderGrouping:String

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

要传递给相关联的 IContentLoader 实例的 load() 方法的可选内容分组标识符。仅在分配有效的 contentLoader 时才会考虑此属性。



实现
    public function get contentLoaderGrouping():String
    public function set contentLoaderGrouping(value:String):void

fillMode

属性 
fillMode:String

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

确定位图填充尺寸的方式。如果在标签中设置此属性的值,请使用字符串(如“repeat”)。如果您在 ActionScript 中设置此属性的值,请使用常量(如 mx.graphics.BitmapFillMode.CLIP)。

设置为 BitmapFillMode.CLIP(“clip”)时,位图在区域的边缘处结束。

设置为 BitmapFillMode.REPEAT(“repeat”)时,位图将重复以填充区域。

设置为 BitmapFillMode.SCALE(“scale”)时,位图将拉伸以填充区域。

默认值为 BitmapFillMode.SCALE



实现
    public function get fillMode():String
    public function set fillMode(value:String):void

相关 API 元素

horizontalAlign

属性 
horizontalAlign:String

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

当内容的高宽比不是 1:1 且 scaleMode 设置为 mx.graphics.BitmapScaleMode.LETTERBOX 时,内容的水平对齐方式。

可以是 HorizontalAlign.LEFT ("left")、HorizontalAlign.RIGHT ("right") 或 HorizontalAlign.CENTER ("center") 之一。

仅当 fillMode 设置为 mx.graphics.BitmapFillMode.SCALE(“缩放”)时,此属性才适用。

默认值为 HorizontalAlign.CENTER



实现
    public function get horizontalAlign():String
    public function set horizontalAlign(value:String):void

相关 API 元素

preliminaryHeight

属性 
preliminaryHeight:Number

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

当布局请求图像的“测量”范围,但图像数据尚未完成加载时,提供要使用的高度的估计值。如果为 NaN,则在图像完成加载之前,测量高度将一直是 0。

默认值为 NaN。



实现
    public function get preliminaryHeight():Number
    public function set preliminaryHeight(value:Number):void

preliminaryWidth

属性 
preliminaryWidth:Number

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

当布局请求图像的“测量”范围,但图像数据尚未完成加载时,提供要使用的宽度的估计值。如果为 NaN,则在图像完成加载之前,测量宽度将一直是 0。

默认值为 NaN。



实现
    public function get preliminaryWidth():Number
    public function set preliminaryWidth(value:Number):void

scaleMode

属性 
scaleMode:String

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10.1, AIR 2.0

确定当 fillMode 设置为 mx.graphics.BitmapFillMode.SCALE 时如何缩放图像。

当设置为 mx.graphics.BitmapScaleMode.STRETCH(“伸展”)时,图像被伸展以适应区域。

在设置为 BitmapScaleMode.LETTERBOX ("letterbox") 时,根据原始未缩放的图像的高宽比对图像进行缩放。

当设置为 BitmapScaleMode.ZOOM(“缩放”),图像会缩放以适应原始的未缩放图像的高宽比。这会导致在一个轴上出现裁剪。

默认值为 BitmapScaleMode.STRETCH



实现
    public function get scaleMode():String
    public function set scaleMode(value:String):void

相关 API 元素

smooth

属性 
smooth:Boolean

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

指定是否将平滑处理算法应用于位图图像。

如果为 false,则使用最近邻点算法来呈现放大的位图图像,而且该图像看起来是像素化的。如果为 true,则使用双线性算法来呈示放大的位图图像。使用最近邻点算法呈现通常较快。

默认值为 false。



实现
    public function get smooth():Boolean
    public function set smooth(value:Boolean):void

smoothingQuality

属性 
smoothingQuality:String

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

确定如何缩小图像。当设置为 BitmapSmoothingQuality.HIGH 时,将重新采样图像(如果数据来源受信任),以达到更高质量的结果。如果设置为 BitmapSmoothingQuality.DEFAULT,则使用缩放的位图填充的默认舞台品质。

默认值为 BitmapSmoothingQuality.DEFAULT



实现
    public function get smoothingQuality():String
    public function set smoothingQuality(value:String):void

source

属性 
source:Object

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

用于位图填充的源。可以呈示基于各种图形源的填充,其中包括:

  • Bitmap 或 BitmapData 实例。
  • 表示 DisplayObject 子类的类。BitmapFill 会将该类实例化并为其创建位图呈示。
  • DisplayObject 的实例。BitmapFill 将其复制到 Bitmap 中以供填充使用。
  • 外部图像文件的名称。

如果使用某个图像文件作为源,则它可以是 PNG、GIF 或 JPG 类型。

要指定一个嵌入的图像源,可以使用 @Embed 指令,如下例所示:

      source="@Embed('<i>image_location</i>')"
      

可通过 URL、URLRequest 或文件引用指定图像位置。如果是文件引用,则其位置是相对于要编译的文件的位置的。

BitmapImage 类旨在与嵌入图像或在运行时加载的图像一起使用。

如果该源是 Bitmap 或 BitmapData 实例,或者是外部图像文件,则一旦不再需要该源时,调用者有责任清除该源。如果 ImageLoader 创建了 BitmapData 实例,则它将在该源更改后清除 BitmapData。

此属性可用作数据绑定的源。修改此属性后,将调度 sourceChanged 事件。



实现
    public function get source():Object
    public function set source(value:Object):void

相关 API 元素

sourceHeight

属性 
sourceHeight:Number  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

提供原始图像数据的未缩放高度。

默认值为 NaN。



实现
    public function get sourceHeight():Number

sourceWidth

属性 
sourceWidth:Number  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

提供原始图像数据的未缩放宽度。

默认值为 NaN。



实现
    public function get sourceWidth():Number

trustedSource

属性 
trustedSource:Boolean  [只读]

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 9, AIR 1.5

一个只读标志,指示是否将当前加载的内容视为是从其安全策略允许跨域图像访问的源加载的。为 false 时,不允许执行高级位图操作,如高品质缩放和拼贴。在全部加载图像后设置此标志。

默认值为 true。



实现
    public function get trustedSource():Boolean

verticalAlign

属性 
verticalAlign:String

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 1.5

当内容的高宽比不是 1:1 且 scaleMode 设置为 mx.graphics.BitmapScaleMode.LETTERBOX 时,内容的垂直对齐方式。

可以是 VerticalAlign.TOP ("top")、VerticalAlign.BOTTOM ("bottom") 或 VerticalAlign.MIDDLE ("middle") 之一。

此属性仅在 scaleMode 设置为 BitmapFillMode.SCALE ("scale") 时才适用。

默认值为 VerticalAlign.MIDDLE



实现
    public function get verticalAlign():String
    public function set verticalAlign(value:String):void

相关 API 元素

构造函数详细信息

BitmapImage

()构造函数
public function BitmapImage()

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

构造函数。

方法详细信息

commitProperties

()方法
override protected function commitProperties():void

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

处理在元素上设置的属性。此方法是一种高级方法,可在创建子类时覆盖。

您无需直接调用此方法。当您使用 addElement() 方法向 IGraphicElementContainer 容器(例如,组)中添加元素时,或调用元素的 invalidateProperties() 方法时,Flex 会调用 commitProperties() 方法。应在调用 measure() 方法之前调用 commitProperties() 方法。这允许您设置 measure() 方法可能会用到的属性值。

某些元素具有可彼此交互的属性。通常,最好在启动时一次性处理所有这些属性以避免重复工作。

measure

()方法 
override protected function measure():void

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

计算元素的默认大小。此方法是一种高级方法,可在创建 GraphicElement 的子类时覆盖。

您无需直接调用此方法。使用 addElement() 方法将元素添加到 IGraphicElementContainer 容器(例如,组)时,以及调用元素的 invalidateSize() 方法时,Flex 会调用 measure() 方法。

默认情况下您会设置元素的显式高度和显式宽度,Flex 不会调用 measure() 方法,即使您显式调用 invalidateSize() 方法也不例外。若要覆盖此行为,请覆盖 skipMeasure() 方法。

覆盖此方法时,必须设置 measuredWidthmeasuredHeight 属性以定义默认大小。您可以选择设置 measuredXmeasuredY 属性以定义相对于元素的原点的默认测量界限左上角。

measure() 的概念点供元素提供其自己的原始或固有界限作为默认值。因此,measuredWidthmeasuredHeight 属性应由以下几个因素确定:

  • 组件需要显示的文本量。
  • 组件所显示的 JPEG 图像的大小。

某些情况下,确定默认值的方式并不固定。例如,对于一个简单的 GreenCircle 元素,可能只需在其 measure() 方法中设置 measuredWidth = 100 和 measuredHeight = 100 便可提供合理的默认大小。而在其他情况下(例如 TextArea),相应计算(例如查找合适的宽度和高度,使其刚好适合显示所有文本并拥有黄金矩形的高宽比)所耗费的时间可能会过长。

measure() 的默认实现会将 measuredWidthmeasuredHeightmeasuredXmeasuredY 属性的值设置为 0

updateDisplayList

()方法 
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void

语言版本: ActionScript 3.0
产品版本: Flex 4
运行时版本: Flash Player 10, AIR 1.5

绘制元素和/或调整其内容的大小并定位该内容。此方法是一种高级方法,可在创建 GraphicElement 的子类时覆盖。

您无需直接调用此方法。使用 addElement() 方法将组件添加到 IGraphicElementContainer 容器(例如,组)时,以及调用元素的 invalidateDisplayList() 方法时,Flex 会调用 updateDisplayList() 方法。

您可以借助此方法使用针对元素的 displayObject(如 graphics.drawRect())上的一些方法以编程方式进行绘制。

参数

unscaledWidth:Number — 指定组件在组件坐标中的宽度(以像素为单位),而不考虑该组件的 scaleX 属性值。
 
unscaledHeight:Number — 指定组件在组件坐标中的高度(以像素为单位),而不考虑该组件的 scaleY 属性值。

事件详细信息

complete

事件
事件对象类型: flash.events.Event
属性 Event.type = flash.events.Event.COMPLETE

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

在内容加载完成时调度。仅对基于 URL 和 ByteArray 的源(这些源需要加载器)调度此事件。

请注意,对于通过加载器加载的内容,将调度 readycomplete 事件。

对于其它源类型(如嵌入),仅调度 ready

Event.COMPLETE 常量定义 complete 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
target已完成加载的网络对象。

httpStatus

事件  
事件对象类型: flash.events.HTTPStatusEvent
属性 HTTPStatusEvent.type = flash.events.HTTPStatusEvent.HTTP_STATUS

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

在通过 HTTP 发出网络请求并且 Flash Player 或 AIR 可以检测到 HTTP 状态代码时调度。

HTTPStatusEvent.HTTP_STATUS 常量定义 httpStatus 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
status由服务器返回的 HTTP 状态代码。
target接收 HTTP 状态代码的网络对象。

ioError

事件  
事件对象类型: flash.events.IOErrorEvent
属性 IOErrorEvent.type = flash.events.IOErrorEvent.IO_ERROR

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

发生输入/输出错误时调度。

定义 ioError 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
errorID与特定错误关联的引用编号(仅限 AIR)。
target发生输入/输出错误的网络对象。
text要显示为错误消息的文本。

相关 API 元素

progress

事件  
事件对象类型: flash.events.ProgressEvent
属性 ProgressEvent.type = flash.events.ProgressEvent.PROGRESS

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

当加载内容时调度。

注意:不能保证调度 progress 事件。在不调度任何 progress 事件的情况下,也可能会接收 complete 事件。如果加载的内容是本地文件,就可能会出现这种情况。

定义 progress 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
bytesLoaded在侦听器处理事件时加载的项数或字节数。
bytesTotal如果加载进程成功,最终将加载的项目或字节总数。
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
target报告进度的对象。

ready

事件  
事件对象类型: mx.events.FlexEvent
属性 FlexEvent.type = mx.events.FlexEvent.READY

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

在内容加载完成时调度。与 complete 事件不同,将为所有源类型调度此事件。

请注意,对于通过加载器加载的内容,将调度 readycomplete 事件。

对于其它源类型(如嵌入),仅调度 ready

FlexEvent.READY 常量为 ready 事件定义事件对象的 type 属性的值。此事件由 BitmapImage 和 Spark Image 类调度以指示指定的图像源已完全加载。

事件对象的属性有下列值:

属性
bubblesfalse
cancelablefalse
returnValuenull
currentTarget用于定义处理该事件的事件侦听器的对象。例如,如果使用 myImage.addEventListener() 注册事件侦听器,则 myImage 是 currentTarget 的值。
target调度该事件的 Object;它不一定是侦听该事件的 Object。使用 currentTarget 属性始终可以访问侦听事件的 Object。
类型FlexEvent.READY

securityError

事件  
事件对象类型: flash.events.SecurityErrorEvent
属性 SecurityErrorEvent.type = flash.events.SecurityErrorEvent.SECURITY_ERROR

语言版本: ActionScript 3.0
产品版本: Flex 4.5
运行时版本: Flash Player 10, AIR 2.0

发生安全性错误时调度。

SecurityErrorEvent.SECURITY_ERROR 常量定义 securityError 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
target报告安全错误的网络对象。
text要显示为错误消息的文本。

相关 API 元素

BitmapImageExample.mxml
<?xml version="1.0" encoding="utf-8"?>
<!-- BitmapGraphicExample.mxml -->
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">

    <s:Panel title="Bitmap Graphic Example"
            width="75%" height="75%"
            horizontalCenter="0" verticalCenter="0">
        <s:Group left="10" right="10" top="10" bottom="10">
            <!-- Single image, not resized, not repeated. -->
            <s:Graphic x="0" y="0">             
                <s:BitmapImage id="bg1" source="@Embed('assets/AirIcon12x12.gif')" fillMode="clip"/>
            </s:Graphic>

            <!-- Single image, scaled to fit specified dimensions. -->
            <s:Graphic x="150" y="0">
                <s:BitmapImage id="bg2" source="@Embed('assets/AirIcon12x12.gif')" width="60" height="60" fillMode="scale"/>
            </s:Graphic>

            <!-- Repeated image to fit specified dimensions. -->
            <s:Graphic x="300" y="0">
                <s:BitmapImage id="bg3" source="@Embed('assets/AirIcon12x12.gif')" width="120" height="120" fillMode="repeat"/>
            </s:Graphic>
        </s:Group>
    </s:Panel>

</s:Application>




[ X ]为什么显示为英语?
《ActionScript 3.0 参考》中的内容以英语显示

《ActionScript 3.0 参考》中的部分内容未翻译成所有语言。当某个语言元素未翻译时,将显示为英语。例如,ga.controls.HelpBox 类未翻译成任何语言。因此在简体中文版的参考中,ga.controls.HelpBox 类显示为英语。