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

HTMLLoader  - 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 的标签
Motion XML 元素
Timed Text 标记
不推荐使用的元素的列表
AccessibilityImplementation 常量
如何使用 ActionScript 示例
法律声明
flash.html
public class HTMLLoader
继承HTMLLoader Inheritance Sprite Inheritance DisplayObjectContainer Inheritance InteractiveObject Inheritance DisplayObject Inheritance EventDispatcher Inheritance Object
子类 FlexHTMLLoader

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

HTMLLoader 类定义作为 HTML 内容容器的显示对象的类型。

AIR 配置文件支持: 所有桌面操作系统均支持此功能,但移动设备或 AIR for TV 设备不支持此功能。您可以使用 HTMLLoader.isSupported 属性在运行时测试是否受支持。有关在多个配置文件之间支持 API 的详细信息,请参阅 AIR 配置文件支持

在桌面计算机上(在桌面和扩展的桌面配置文件中),HTMLLoader 类使用内部 AIR WebKit 引擎。其可用的功能和呈现外观与 StageWebView 类相同,并且在 ActionScript 和 javascript 之间实现了紧密集成和脚本桥接。由于 StageWebView 类使用 Flash Player 插件提供的系统 web 控件,因此强烈建议不要同时使用 StageWebView 和 HTMLLoader 实例,否则会发生未定义的行为,从而可能使应用程序终止运行。

HTMLLoader 的默认尺寸为 0 x 0 像素。设置 widthheight 属性可使 HTMLLoader 对象可见。

HTMLLoader 对象的最大高度为 4,096 像素,最大宽度为 4,096 像素。如果将 HTMLLoader 对象的 widthheight 设置为大于 4,095 的某个数字,将导致 HTMLLoader 对象引发 ArgumentError 异常。(注意,在 AIR 2 之前的版本中,HTMLLoader 对象的最大尺寸是 2,880 像素。)

注意:在透明的窗口中显示时,必须使用 transparentopaque wmode 嵌入 HTML 页中嵌入的 SWF 内容。wmode 的默认值为 window,因此如果不指定任何值,将不会显示 SWF 内容。在 Windows 和 Linux 上,如果将 wmode 设置为 windowopaque,SWF 内容将始终显示在其他内容的前面。但是无论 wmode 设置如何,PDF 内容都无法显示在透明窗口中。

查看示例



公共属性
 属性由以下参数定义
 InheritedaccessibilityImplementation : AccessibilityImplementation
InteractiveObject 实例的当前辅助功能实现 (AccessibilityImplementation)。
InteractiveObject
 InheritedaccessibilityProperties : AccessibilityProperties
此显示对象的当前辅助功能选项。
DisplayObject
 Inheritedalpha : Number
表示指定对象的 Alpha 透明度值。
DisplayObject
      authenticate : Boolean
指定是否应为此对象发出的 HTTP 请求处理验证请求,如果是,则为 true,否则为 false。
HTMLLoader
 InheritedblendMode : String
BlendMode 类中的一个值,用于指定要使用的混合模式。
DisplayObject
 InheritedblendShader : Shader
[只写] 设置用于混合前景和背景的着色器。
DisplayObject
 InheritedbuttonMode : Boolean
指定此 sprite 的按钮模式。
Sprite
 InheritedcacheAsBitmap : Boolean
如果设置为 true,则 Flash 运行时将缓存显示对象的内部位图表示形式。
DisplayObject
 Inherited    cacheAsBitmapMatrix : Matrix
如果为非 null,则 Matrix 对象会定义显示对象在 cacheAsBitmap 设置为 true 时的呈现方式。
DisplayObject
      cacheResponse : Boolean
指定是否应为此对象发出的 HTTP 请求缓存成功的响应数据。
HTMLLoader
 Inheritedconstructor : Object
对类对象或给定对象实例的构造函数的引用。
Object
      contentHeight : Number
[只读] HTML 内容的高度(以像素为单位)。
HTMLLoader
      contentWidth : Number
[只读] HTML 内容的宽度(以像素为单位)。
HTMLLoader
 InheritedcontextMenu : NativeMenu
指定与此对象相关联的上下文菜单。
InteractiveObject
 InheriteddoubleClickEnabled : Boolean
指定此对象是否接收 doubleClick 事件。
InteractiveObject
 InheriteddropTarget : DisplayObject
[只读] 指定拖动 sprite 时经过的显示对象,或放置 sprite 的显示对象。
Sprite
 Inheritedfilters : Array
包含当前与显示对象关联的每个滤镜对象的索引数组。
DisplayObject
 InheritedfocusRect : Object
指定此对象是否显示焦点矩形。
InteractiveObject
 Inheritedgraphics : Graphics
[只读] 指定属于此 sprite 的 Graphics 对象,在此 sprite 中可执行矢量绘图命令。
Sprite
      hasFocusableContent : Boolean
[只读] 表示 HTMLLoader 对象中的任何内容是否可获得焦点。
HTMLLoader
      height : Number
[覆盖] 指定所呈现的 HTML 画布的矩形高度。
HTMLLoader
      historyLength : uint
[只读] 历史记录列表的总长度,包括向后和向前的条目。
HTMLLoader
      historyPosition : uint
历史记录列表中的当前位置。
HTMLLoader
 InheritedhitArea : Sprite
指定一个 sprite 用作另一个 sprite 的点击区域。
Sprite
      htmlHost : flash.html:HTMLHost
用于处理某些用户界面元素更改的 HTMLHost 对象,如 HTMLLoader 对象的 window.document.title 属性。
HTMLLoader
      idleTimeout : Number
指定此对象发出的 HTTP 请求的空闲超时值(以毫秒为单位)。
HTMLLoader
      isSupported : Boolean
[静态] [只读] 表示客户端系统是否支持 HTMLLoader 类。
HTMLLoader
      loaded : Boolean
[只读] 表示与先前调用 load() 或 loadString() 方法相对应的 JavaScript load 事件是否已传送到 HTMLLoader 对象中的 HTML DOM。
HTMLLoader
 InheritedloaderInfo : LoaderInfo
[只读] 返回一个 LoaderInfo 对象,其中包含加载此显示对象所属的文件的相关信息。
DisplayObject
      location : String
[只读] 在 HTMLLoader 对象中加载的内容的 URL。
HTMLLoader
      manageCookies : Boolean
指定 HTTP 协议堆栈是否应管理此对象的 cookie。
HTMLLoader
 Inheritedmask : DisplayObject
调用显示对象被指定的 mask 对象遮罩。
DisplayObject
 InheritedmetaData : Object
如果元数据是通过 PlaceObject4 标记与此 DisplayObject 的实例一起存储在 SWF 文件中的,则获取 DisplayObject 实例的元数据对象。
DisplayObject
 InheritedmouseChildren : Boolean
确定对象的子级是否支持鼠标或用户输入设备。
DisplayObjectContainer
 InheritedmouseEnabled : Boolean
指定此对象是否接收鼠标或其他用户输入、消息。
InteractiveObject
 InheritedmouseX : Number
[只读] 表示此鼠标或用户输入设备位置的 x 坐标,以像素为单位。
DisplayObject
 InheritedmouseY : Number
[只读] 表示此鼠标或用户输入设备位置的 y 坐标,以像素为单位。
DisplayObject
 Inheritedname : String
表示 DisplayObject 的实例名称。
DisplayObject
      navigateInSystemBrowser : Boolean
指定 HTML 内容根帧的导航(如用户单击链接时、设置 window.location 属性时或调用 window.open() 时)是导致在 HTMLLoader 对象中导航 (false) 还是在默认系统 Web 浏览器中导航 (true)。
HTMLLoader
 InheritedneedsSoftKeyboard : Boolean
指定当该 InteractiveObject 实例获得焦点时,是否显示虚拟键盘(显示在屏幕上的软键盘)。
InteractiveObject
 InheritednumChildren : int
[只读] 返回此对象的子项数目。
DisplayObjectContainer
 InheritedopaqueBackground : Object
指定显示对象是否由于具有某种背景颜色而不透明。
DisplayObject
      paintsDefaultBackground : Boolean
指定 HTMLLoader 文档背景是否为不透明白色,如果是,则为 true,否则为 false。
HTMLLoader
 Inheritedparent : DisplayObjectContainer
[只读] 表示包含此显示对象的 DisplayObjectContainer 对象。
DisplayObject
      pdfCapability : int
[静态] [只读] 用户系统上的 PDF 支持类型,它被定义为整数代码值。
HTMLLoader
      placeLoadStringContentInApplicationSandbox : Boolean
指定通过 loadString() 方法加载的内容放置在应用程序沙箱中 (true) 还是非应用程序沙箱中 (false)。
HTMLLoader
 Inheritedroot : DisplayObject
[只读] 对于加载的 SWF 文件中的显示对象,root 属性是此 SWF 文件所表示的显示列表树结构部分中的顶级显示对象。
DisplayObject
 Inheritedrotation : Number
表示 DisplayObject 实例距其原始方向的旋转程度,以度为单位。
DisplayObject
 InheritedrotationX : Number
表示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 x 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationY : Number
表示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 y 轴旋转(以度为单位)。
DisplayObject
 InheritedrotationZ : Number
表示 DisplayObject 实例相对于 3D 父容器距离其原始方向的 z 轴旋转(以度为单位)。
DisplayObject
      runtimeApplicationDomain : ApplicationDomain
用于 HTML 页的 JavaScript 中的 window.runtime 对象的应用程序域。
HTMLLoader
 Inheritedscale9Grid : Rectangle
当前有效的缩放网格。
DisplayObject
 InheritedscaleX : Number
表示从注册点开始应用的对象的水平缩放比例(百分比)。
DisplayObject
 InheritedscaleY : Number
表示从对象注册点开始应用的对象的垂直缩放比例(百分比)。
DisplayObject
 InheritedscaleZ : Number
表示从对象的注册点开始应用的对象的深度缩放比例(百分比)。
DisplayObject
      scrollH : Number
HTMLLoader 对象中的 HTML 内容的水平滚动位置。
HTMLLoader
 InheritedscrollRect : Rectangle
显示对象的滚动矩形范围。
DisplayObject
      scrollV : Number
HTMLLoader 对象中的 HTML 内容的垂直滚动位置。
HTMLLoader
 Inherited    softKeyboard : String
控制软键盘的外观。
InteractiveObject
 InheritedsoftKeyboardInputAreaOfInterest : Rectangle
定义当显示软键盘时应在屏幕上保留的区域(在 iOS 上不支持)。
InteractiveObject
 InheritedsoundTransform : flash.media:SoundTransform
控制此 sprite 中的声音。
Sprite
 Inheritedstage : Stage
[只读] 显示对象的舞台。
DisplayObject
      swfCapability : int
[静态] [只读] 用户系统上的 SWF 支持类型,它被定义为整数代码值。
HTMLLoader
 InheritedtabChildren : Boolean
确定对象的子项是否支持 Tab 键。
DisplayObjectContainer
 InheritedtabEnabled : Boolean
指定此对象是否遵循 Tab 键顺序。
InteractiveObject
 InheritedtabIndex : int
指定 SWF 文件中的对象按 Tab 键顺序排列。
InteractiveObject
      textEncodingFallback : String
在 HTML 页未指定字符编码时 HTMLLoader 内容使用的字符编码。
HTMLLoader
      textEncodingOverride : String
HTMLLoader 内容使用的字符编码,它将覆盖 HTML 页中的任何设置。
HTMLLoader
 InheritedtextSnapshot : flash.text:TextSnapshot
[只读] 返回此 DisplayObjectContainer 实例的 TextSnapshot 对象。
DisplayObjectContainer
 Inheritedtransform : flash.geom:Transform
一个对象,具有与显示对象的矩阵、颜色转换和像素范围有关的属性。
DisplayObject
      useCache : Boolean
指定在此对象发出的 HTTP 请求获取数据之前是否应查询本地缓存。
HTMLLoader
 InheriteduseHandCursor : Boolean
布尔值,表示当指针滑过 buttonMode 属性设置为 true 的 sprite 时是否显示指针手形(手形光标)。
Sprite
      userAgent : String
来自此 HTMLLoader 对象的任何后续内容请求中使用的用户代理字符串。
HTMLLoader
 Inheritedvisible : Boolean
显示对象是否可见。
DisplayObject
      width : Number
[覆盖] 指定所呈现的 HTML 画布的矩形宽度。
HTMLLoader
      window : Object
[只读] 加载到 HTML 控件中的内容的全局 JavaScript 对象。
HTMLLoader
 Inheritedx : Number
表示 DisplayObject 实例相对于父级 DisplayObjectContainer 本地坐标的 x 坐标。
DisplayObject
 Inheritedy : Number
表示 DisplayObject 实例相对于父级 DisplayObjectContainer 本地坐标的 y 坐标。
DisplayObject
 Inheritedz : Number
表示 DisplayObject 实例相对于 3D 父容器沿 z 轴的 z 坐标位置。
DisplayObject
公共方法
 方法由以下参数定义
  
    HTMLLoader()
创建 HTMLLoader 对象。
HTMLLoader
 Inherited
将一个 DisplayObject 子实例添加到该 DisplayObjectContainer 实例中。
DisplayObjectContainer
 Inherited
将一个 DisplayObject 子实例添加到该 DisplayObjectContainer 实例中。
DisplayObjectContainer
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
使用 EventDispatcher 对象注册事件侦听器对象,以使侦听器能够接收事件通知。
EventDispatcher
 Inherited
表示安全限制是否会导致出现以下情况:在列表中忽略了使用指定 point 点调用 DisplayObjectContainer.getObjectsUnderPoint() 方法时返回的所有显示对象。
DisplayObjectContainer
  
    cancelLoad():void
取消正在进行的任何加载操作。
HTMLLoader
 Inherited
确定指定显示对象是 DisplayObjectContainer 实例的子项还是该实例本身。
DisplayObjectContainer
  
    createRootWindow(visible:Boolean = true, windowInitOptions:NativeWindowInitOptions = null, scrollBarsVisible:Boolean = true, bounds:Rectangle = null):flash.html:HTMLLoader
[静态] 创建新的 NativeWindow 对象,其中包含 HTMLLoader 对象。
HTMLLoader
 Inherited
将事件调度到事件流中。
EventDispatcher
 Inherited
getBounds(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形定义相对于 targetCoordinateSpace 对象坐标系的显示对象区域。
DisplayObject
 Inherited
返回位于指定索引处的子显示对象实例。
DisplayObjectContainer
 Inherited
返回具有指定名称的子显示对象。
DisplayObjectContainer
 Inherited
返回 DisplayObject 的 child 实例的索引位置。
DisplayObjectContainer
  
返回指定位置的历史记录条目。
HTMLLoader
 Inherited
返回对象的数组,这些对象位于指定点下,并且是该 DisplayObjectContainer 实例的子项(或孙子项,依此类推)。
DisplayObjectContainer
 Inherited
getRect(targetCoordinateSpace:DisplayObject):Rectangle
返回一个矩形,该矩形根据 targetCoordinateSpace 参数定义的坐标系定义显示对象的边界,但不包括形状上的任何笔触。
DisplayObject
 Inherited
将 point 对象从舞台(全局)坐标转换为显示对象的(本地)坐标。
DisplayObject
 Inherited
将二维点从舞台(全局)坐标转换为三维显示对象的(本地)坐标。
DisplayObject
 Inherited
检查 EventDispatcher 对象是否为特定事件类型注册了任何侦听器。
EventDispatcher
 Inherited
表示对象是否已经定义了指定的属性。
Object
  
    historyBack():void
如果可能,在浏览器历史记录中向后浏览。
HTMLLoader
  
如果可能,在浏览器历史记录中向前浏览。
HTMLLoader
  
    historyGo(steps:int):void
在浏览器历史记录中浏览指定的步骤数。
HTMLLoader
 Inherited
计算显示对象的边框,以确定它是否与 obj 显示对象的边框重叠或相交。
DisplayObject
 Inherited
hitTestPoint(x:Number, y:Number, shapeFlag:Boolean = false):Boolean
计算显示对象,以确定它是否与 x 和 y 参数指定的点重叠或相交。
DisplayObject
 Inherited
表示 Object 类的实例是否在指定为参数的对象的原型链中。
Object
  
    load(urlRequestToLoad:URLRequest):void
使用 urlRequestToLoad 参数指定的站点中的数据加载 HTMLLoader 对象。
HTMLLoader
  
    loadString(htmlContent:String):void
使用 HTML 字符串中包含的 HTML 内容加载 HTMLLoader 对象。
HTMLLoader
 Inherited
将三维显示对象的(本地)坐标的三维点转换为舞台(全局)坐标中的二维点。
DisplayObject
 Inherited
将 point 对象从显示对象的(本地)坐标转换为舞台(全局)坐标。
DisplayObject
 Inherited
表示指定的属性是否存在、是否可枚举。
Object
  
    reload():void
从当前位置重新加载页面。
HTMLLoader
 Inherited
从 DisplayObjectContainer 实例的子列表中删除指定的 child DisplayObject 实例。
DisplayObjectContainer
 Inherited
从 DisplayObjectContainer 的子列表中指定的 index 位置删除子 DisplayObject。
DisplayObjectContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 0x7fffffff):void
从 DisplayObjectContainer 实例的子级列表中删除所有子 DisplayObject 实例。
DisplayObjectContainer
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
从 EventDispatcher 对象中删除侦听器。
EventDispatcher
 Inherited
显示虚拟键盘。
InteractiveObject
 Inherited
更改现有子项在显示对象容器中的位置。
DisplayObjectContainer
 Inherited
设置循环操作动态属性的可用性。
Object
 Inherited
startDrag(lockCenter:Boolean = false, bounds:Rectangle = null):void
允许用户拖动指定的 Sprite。
Sprite
 Inherited
startTouchDrag(touchPointID:int, lockCenter:Boolean = false, bounds:Rectangle = null):void
使用户可以在启用触摸的设备上拖动指定的 Sprite。
Sprite
 Inherited
对源起于此对象的所有 MovieClip 递归停止时间轴执行。
DisplayObjectContainer
 Inherited
结束 startDrag() 方法。
Sprite
 Inherited
stopTouchDrag(touchPointID:int):void
结束 startTouchDrag() 方法,用于启用触摸的设备。
Sprite
 Inherited
交换两个指定子对象的 Z 轴顺序(从前到后顺序)。
DisplayObjectContainer
 Inherited
swapChildrenAt(index1:int, index2:int):void
在子级列表中两个指定的索引位置,交换子对象的 Z 轴顺序(前后顺序)。
DisplayObjectContainer
 Inherited
返回此对象的字符串表示形式,其格式设置遵守区域设置特定的约定。
Object
 Inherited
返回指定对象的字符串表示形式。
Object
 Inherited
返回指定对象的原始值。
Object
 Inherited
检查是否用此 EventDispatcher 对象或其任何祖代为指定事件类型注册了事件侦听器。
EventDispatcher
事件
 事件 摘要 由以下参数定义
 Inherited[广播事件] Flash Player 或 AIR 应用程序获得操作系统焦点并变为活动状态时将调度此事件。EventDispatcher
 Inherited将显示对象添加到显示列表中时调度。DisplayObject
 Inherited在将显示对象直接添加到舞台显示列表或将包含显示对象的子树添加至舞台显示列表中时调度。DisplayObject
 Inherited当用户从文本上下文菜单中选择“清除”(或“删除”)时调度。InteractiveObject
 Inherited用户在同一 InteractiveObject 上按下并释放用户指针设备的主按钮时调度。InteractiveObject
  
    complete
指出 loadString 或 load 方法上次请求的加载操作已完成。HTMLLoader
 Inherited
    contextMenu
当用户手势触发 AIR 应用程序中与此交互式对象相关联的上下文菜单时调度。InteractiveObject
 Inherited在用户为复制操作激活特定于平台的加速键组合或从文本上下文菜单中选择“复制”时调度。InteractiveObject
 Inherited在用户为剪切操作激活特定于平台的加速键组合或从文本上下文菜单中选择“剪切”时调度。InteractiveObject
 Inherited[广播事件] Flash Player 或 AIR 应用程序失去操作系统焦点并变为非活动状态时将调度此事件。EventDispatcher
 Inherited如果 InteractiveObject 的 doubleClickEnabled 标志设置为 true,当用户在该对象上快速连续按下两次并释放指针设备的主按钮时调度。InteractiveObject
 Inherited[播放事件] 播放头进入新帧时调度。DisplayObject
 Inherited[广播事件] 播放头退出当前帧时调度。DisplayObject
 Inherited显示对象获得焦点后调度。InteractiveObject
 Inherited显示对象失去焦点后调度。InteractiveObject
 Inherited[广播事件] 在帧显示对象的构造函数运行之后但在帧脚本运行之前调度。DisplayObject
 Inherited当用户使用 InteractiveObject 实例沿触摸面边缘创建接触点时调度(如在 Siri Remote for Apple TV 上沿触摸面边缘轻击)。有些设备也可能将这种接触解释为多个触摸事件的组合。InteractiveObject
 Inherited当用户在启用触摸设备上的同一 InteractiveObject 实例上按下两个接触点时(例如,在配有触摸屏的移动电话或平板电脑上的显示对象上按下和释放两个手指)调度。InteractiveObject
 Inherited当用户在启用触摸的设备上的 InteractiveObject 实例上移动接触点时(例如,在配有触摸屏的移动电话或平板电脑上的显示对象上从左向右移动手指)调度。InteractiveObject
 Inherited当用户在接触点处使用 InteractiveObject 实例执行旋转手势时(例如,将两个手指放在屏幕上,然后在配有触摸屏的移动电话或平板电脑上的显示对象上旋转这两个手指)调度。InteractiveObject
 Inherited当用户在接触点处使用 InteractiveObject 实例执行滑动手势(例如,在配有触摸屏的移动电话或平板电脑上用三根手指触摸屏幕,然后在一个显示对象上平行移动这三根手指)时调度。InteractiveObject
 Inherited当用户使用 InteractiveObject 实例创建接触点,然后点击启用触屏的设备时(例如,将几个手指放在显示对象上以打开菜单,然后点击一个手指在配有触摸屏的移动电话或平板电脑上选择一个菜单项)调度。InteractiveObject
 Inherited当用户在接触点处使用 InteractiveObject 实例执行缩放手势操作时(例如,将两个手指放在屏幕上,然后在配有触摸屏的移动电话或平板电脑上的显示对象上快速分开手指)调度。InteractiveObject
  指出 HTMLLoader 对象的 contentWidth 和/或 contentHeight 属性已发生更改。HTMLLoader
  指出已创建 HTML DOM 以响应加载操作。HTMLLoader
  
    htmlRender
指出 HTMLLoader 对象中的内容呈现完全处于最新状态。HTMLLoader
 Inherited此事件被调度到任何支持使用 IME 进行内联输入的客户端应用程序InteractiveObject
 Inherited用户按下某个键时调度。InteractiveObject
 Inherited用户尝试使用键盘导航更改焦点时调度。InteractiveObject
 Inherited用户释放某个键时调度。InteractiveObject
  指出更改了 HTMLLoader 对象的 location 属性。HTMLLoader
  指出更改了 HTMLLoader 对象的 location 属性。HTMLLoader
  表示 HTMLLoader 对象的 location 属性即将更改。HTMLLoader
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备的中间按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited用户尝试使用指针设备更改焦点时调度。InteractiveObject
 Inherited用户移动 InteractiveObject 上的指针设备时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited当鼠标滚轮滚动到 InteractiveObject 实例上时调度。InteractiveObject
 Inherited当用户释放拖动手势时由拖动启动器 InteractiveObject 调度。InteractiveObject
 Inherited在将拖动对象放置到目标上且已通过对 DragManager.acceptDragDrop() 的调用接受该放置操作时,由目标 InteractiveObject 调度。InteractiveObject
 Inherited当拖动手势进入其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动手势离开其边界时由 InteractiveObject 调度。InteractiveObject
 Inherited当拖动手势保持在其边界内时,由 InteractiveObject 持续调度。InteractiveObject
 Inherited在拖动操作开始时由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited在拖动操作期间由在 DragManager.doDrag() 调用中指定为拖动启动器的 InteractiveObject 调度。InteractiveObject
 Inherited在用户为粘贴操作激活特定于平台的加速键组合或从文本上下文菜单中选择“粘贴”时调度。InteractiveObject
 Inherited当用户将活动笔针放低经过屏幕的邻近检测阈值上时调度。InteractiveObject
 Inherited
    proximityEnd
当用户将活动笔针抬高放在屏幕的邻近检测阈值上时调度。InteractiveObject
 Inherited当用户将活动笔针移动到屏幕上但仍保留在邻近检测阈值中时调度。InteractiveObject
 Inherited
    proximityOut
当用户直接将活动笔针从此 InteractiveObject 上移开但仍保留在屏幕的邻近检测阈值中时调度。InteractiveObject
 Inherited当用户直接将活动笔针移动到此 InteractiveObject 上但仍保留在屏幕的邻近检测阈值中时调度。InteractiveObject
 Inherited当用户从此 InteractiveObject 及其任一子项中移开而仍保留在屏幕的邻近检测阈值中时调度。InteractiveObject
 Inherited当用户将活动笔针从显示列表中子项的对象树中滑过此 InteractiveObject 时(而仍保留在屏幕的邻近检测阈值中)时调度。InteractiveObject
 Inherited在用户首先在 InteractiveObject 实例上按下按钮,然后将指针设备移离 InteractiveObject 实例,释放指针设备上的按钮时调度。InteractiveObject
 Inherited将要从显示列表中删除显示对象时调度。DisplayObject
 Inherited在从显示列表中直接删除显示对象或删除包含显示对象的子树时调度。DisplayObject
 Inherited[广播事件] 将要更新和呈现显示列表时调度。DisplayObject
 Inherited当用户在同一 InteractiveObject 上按下并释放用户指针设备的右按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上按下指针设备按钮时调度。InteractiveObject
 Inherited当用户在 InteractiveObject 实例上释放指针设备按钮时调度。InteractiveObject
 Inherited用户将指针设备从 InteractiveObject 实例上移开时调度。InteractiveObject
 Inherited用户将指针设备移动到 InteractiveObject 实例上时调度。InteractiveObject
  
    scroll
指出 scrollH 或 scrollV 属性已被 HTMLLoader 对象更改。HTMLLoader
 Inherited在用户为全选操作激活特定于平台的加速键组合或从文本上下文菜单中选择“全选”时调度。InteractiveObject
 Inherited在放开软键盘之后立即调度。InteractiveObject
 Inherited在放开软键盘之前立即调度。InteractiveObject
 Inherited在隐藏软键盘之后立即调度。InteractiveObject
 Inherited对象的 tabChildren 标志值发生更改时调度。InteractiveObject
 Inherited对象的 tabEnabled 标志发生更改时调度。InteractiveObject
 Inherited对象的 tabIndex 属性值发生更改时调度。InteractiveObject
 Inherited当用户输入一个或多个文本字符时调度。InteractiveObject
 Inherited当用户第一次触摸启用触摸的设备时(例如,用手指触摸配有触摸屏的移动电话或平板)调度。InteractiveObject
 Inherited当用户移除与启用触摸的设备的接触时(例如,将手指从配有触摸屏的移动电话或平板电脑上抬起)调度。InteractiveObject
 Inherited当用户触碰设备时进行调度,而且会连续调度,直到接触点被删除。InteractiveObject
 Inherited当用户将接触点从启用触摸的设备上的 InteractiveObject 实例移开时(例如,在配有触摸屏的移动电话或平板电脑上,将手指从一个显示对象拖到另一个显示对象)调度。InteractiveObject
 Inherited当用户在启用触摸的设备的 InteractiveObject 实例上移动接触点时(例如,在配有触摸屏的移动电话或平板电脑上,将手指从显示对象外的一点拖动到显示对象上的一点)调度。InteractiveObject
 Inherited当用户移动接触点,使其远离启用触摸的设备上的 InteractiveObject 实例时(例如,在配有触摸屏的移动电话或平板电脑上将一个手指从显示对象上的一点移动到显示对象外的一点)调度。InteractiveObject
 Inherited当用户在启用触摸的设备的 InteractiveObject 实例上移动接触点时(例如,在配有触摸屏的移动电话或平板电脑上,将手指从显示对象外的一点拖动到显示对象上的一点)调度。InteractiveObject
 Inherited当用户在启用触摸设备上的已启动接触的同一 InteractiveObject 实例上抬起接触点时(例如,在配有触摸屏的移动电话或平板的显示对象上的某一点处按下并释放手指)调度。InteractiveObject
  指出在 HTMLLoader 对象中发生了未捕获的 JavaScript 异常。HTMLLoader
属性详细信息
    

authenticate

属性
authenticate:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

指定是否应为此对象发出的 HTTP 请求处理验证请求,如果是,则为 true,否则为 false。如果为 false,则验证挑战返回 HTTP 错误。

默认值为 initialized from URLRequestDefaults.authenticate。



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

相关 API 元素

    

cacheResponse

属性 
cacheResponse:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

指定是否应为此对象发出的 HTTP 请求缓存成功的响应数据。设置为 true 时,HTMLLoader 对象将使用操作系统的 HTTP 缓存。

默认值为 initialized from URLRequestDefaults.cacheResponse。



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

相关 API 元素

    

contentHeight

属性 
contentHeight:Number  [只读]

运行时版本: AIR 1.0

HTML 内容的高度(以像素为单位)。此属性可以随着 HTMLLoader 对象尺寸的更改而更改。例如,HTML 页通常使用 HTMLLoader 对象的整个高度,如果更改 HTMLLoader 对象的高度,则 contentHeight 属性可能会发生更改。



实现
    public function get contentHeight():Number
    

contentWidth

属性 
contentWidth:Number  [只读]

运行时版本: AIR 1.0

HTML 内容的宽度(以像素为单位)。此属性可以随着 HTMLLoader 对象尺寸的更改而更改。例如,HTML 页通常使用 HTMLLoader 对象的整个宽度,如果更改 HTMLLoader 对象的宽度,则 contentWidth 属性可能会发生更改。



实现
    public function get contentWidth():Number
    

hasFocusableContent

属性 
hasFocusableContent:Boolean  [只读]

运行时版本: AIR 1.0

表示 HTMLLoader 对象中的任何内容是否可获得焦点。



实现
    public function get hasFocusableContent():Boolean
    

height

属性 
height:Number[覆盖]

运行时版本: AIR 1.0

指定所呈现的 HTML 画布的矩形高度。此属性值是 HTMLLoader 显示对象的高度(以像素为单位)。height 的最大值为 4095 像素。更改此属性将导致 HTMLLoader 对象重新呈现 HTML 文档。可以调度 htmlBoundsChanged 事件以响应此属性的更改。

在设置 HTMLLoader 对象的 widthheight 属性时,该对象的范围将发生更改,但内容不会缩放(其他类型的显示对象将会发生缩放)。



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

historyLength

属性 
historyLength:uint  [只读]

运行时版本: AIR 1.0

历史记录列表的总长度,包括向后和向前的条目。此属性具有与 HTML 页的 window.history.length JavaScript 属性相同的值。



实现
    public function get historyLength():uint

相关 API 元素

    

historyPosition

属性 
historyPosition:uint

运行时版本: AIR 1.0

历史记录列表中的当前位置。历史记录列表对应于 HTML 页的 window.history 对象。低于当前位置的条目为“向前”列表,高于当前位置的条目为“向后”列表。尝试将位置设置在末尾以外的会将位置设置到末尾处。



实现
    public function get historyPosition():uint
    public function set historyPosition(value:uint):void

相关 API 元素

    

htmlHost

属性 
htmlHost:flash.html:HTMLHost

运行时版本: AIR 1.0

用于处理某些用户界面元素更改的 HTMLHost 对象,如 HTMLLoader 对象的 window.document.title 属性。若要覆盖 HTMLLoader 对象的默认行为,请创建 HTMLHost 类的一个子类,然后覆盖其成员函数以处理 HTML 内容中的各种用户界面更改。



实现
    public function get htmlHost():flash.html:HTMLHost
    public function set htmlHost(value:flash.html:HTMLHost):void

相关 API 元素

    

idleTimeout

属性 
idleTimeout:Number

语言版本: ActionScript 3.0
运行时版本: AIR 2

指定此对象发出的 HTTP 请求的空闲超时值(以毫秒为单位)。

空闲超时值是指客户端在建立连接之后、放弃请求之前等待服务器响应的时间。

默认值为 initialized from URLRequestDefaults.idleTimeout。



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

相关 API 元素

    

isSupported

属性 
isSupported:Boolean  [只读]

运行时版本: AIR 2

表示客户端系统是否支持 HTMLLoader 类。



实现
    public static function get isSupported():Boolean
    

loaded

属性 
loaded:Boolean  [只读]

运行时版本: AIR 1.0

表示与先前调用 load()loadString() 方法相对应的 JavaScript load 事件是否已传送到 HTMLLoader 对象中的 HTML DOM。调度 complete 事件之前,此属性为 true。此属性有可能永远也不会变为 true。在从来不调度 complete 事件的情况下也会发生这种情况。



实现
    public function get loaded():Boolean
    

location

属性 
location:String  [只读]

运行时版本: AIR 1.0

在 HTMLLoader 对象中加载的内容的 URL。



实现
    public function get location():String
    

manageCookies

属性 
manageCookies:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

指定 HTTP 协议堆栈是否应管理此对象的 cookie。如果为 true,则将 cookie 添加到请求中并记住响应 cookie。如果为 false,则 将 cookie 添加到请求中且 记住响应 cookie。

默认值为 initialized from URLRequestDefaults.manageCookies。



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

相关 API 元素

    

navigateInSystemBrowser

属性 
navigateInSystemBrowser:Boolean

运行时版本: AIR 1.0

指定 HTML 内容根帧的导航(如用户单击链接时、设置 window.location 属性时或调用 window.open() 时)是导致在 HTMLLoader 对象中导航 (false) 还是在默认系统 Web 浏览器中导航 (true)。如果希望所有导航都在系统 Web 浏览器中(而不是在 HTMLLoader 对象中)进行,请将此属性设置为 true

默认值为 false。



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

paintsDefaultBackground

属性 
paintsDefaultBackground:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

指定 HTMLLoader 文档背景是否为不透明白色,如果是,则为 true,否则为 false。如果将此属性设置为 false,HTMLLoader 对象将使用其显示对象容器作为 HTML 的背景,而 HTML 将使用显示对象容器的不透明度(alpha 值)作为 HTML 背景。但是,如果 HTML 文档的 body 元素或任何其他元素具有不透明背景颜色(例如,由 style="background-color:gray" 指定),则所呈现的 HTML 部分将使用指定的不透明背景颜色。



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

pdfCapability

属性 
pdfCapability:int  [只读]

运行时版本: AIR 1.0

用户系统上的 PDF 支持类型,它被定义为整数代码值。只有在此属性的计算结果为 PDFCapability.STATUS_OK 时,HTMLLoader 对象才能显示 PDF 内容。PDFCapability 类定义用作 pdfCapability 属性的可能值的常数,如下所示:

PDFCapability 常量意义
STATUS_OK已检测到足够高的 Acrobat 或 Adobe Reader 版本(8.1 或更高版本),可以在 HTMLLoader 对象中加载 PDF 内容。

注意:在 Windows 中,如果用户系统上当前正在运行 Acrobat 或 Adobe Reader 7.x 或更高版本,则即使安装了支持加载在 HTMLLoader 对象中已加载的 PDF 的更高版本,也会使用正在运行的那个版本。在这种情况下,如果 pdfCapability 属性的值为 PDFCapability.STATUS_OK,则当 AIR 应用程序尝试加载 PDF 内容时,Acrobat 或 Adobe Reader 的较早版本会显示警告(而 AIR 运行时不显示任何错误消息)。如果您的用户可能会遇到这种情况,请考虑指导他们在运行您的应用程序时关闭 Acrobat 或 Adobe Reader。如果 PDF 内容没有在可接受的时间范围内加载,可以考虑显示这些说明。

ERROR_INSTALLED_READER_NOT_FOUND未检测到任何 Acrobat 或 Adobe Reader 版本。HTMLLoader 对象无法显示 PDF 内容。
ERROR_INSTALLED_READER_TOO_OLD已检测到 Acrobat 或 Adobe Reader,但版本太旧。HTMLLoader 对象无法显示 PDF 内容。
ERROR_PREFERED_READER_TOO_OLD已检测到足够高的 Acrobat 或 Adobe Reader 版本(8.1 或更高版本),但为处理 PDF 内容而设置的版本比 8.1 版旧。HTMLLoader 对象无法显示 PDF 内容。



实现
    public static function get pdfCapability():int

相关 API 元素

    

placeLoadStringContentInApplicationSandbox

属性 
placeLoadStringContentInApplicationSandbox:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.5

指定通过 loadString() 方法加载的内容放置在应用程序沙箱中 (true) 还是非应用程序沙箱中 (false)。

将此属性设置为 false 时,通过 loadString() 方法加载的内容放置在具有以下特征的非应用程序沙箱中:

  • 它有权从网络加载内容(但不能从文件系统加载)。
  • 无法使用 XMLHttpRequest 加载数据。
  • window.location 属性设置为 "about:blank"
  • 内容无法访问 window.runtime 属性(如同任何非应用程序沙箱中的内容)。

将此属性设置为 true 时,通过 loadString() 方法加载的内容放置在应用程序沙箱中,并有权访问 window.runtime 属性和所有 AIR API。您应该确保调用 loadString() 方法过程中使用的字符串的数据源受信任。此属性设置为 true 时,将以完整的应用程序权限执行 HTML 字符串中的代码语句。只有在确定字符串不会包含有害代码时,才应该将此属性设置为 true

在用 AIR 1.0 或 AIR 1.1 SDK 编译的应用程序中,通过 loadString() 方法加载的内容放置在应用程序沙箱中。

默认值为 false。



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

相关 API 元素

    

runtimeApplicationDomain

属性 
runtimeApplicationDomain:ApplicationDomain

运行时版本: AIR 1.0

用于 HTML 页的 JavaScript 中的 window.runtime 对象的应用程序域。

如果为 null,或者如果 HTML 内容来自与包含 HTMLLoader 对象的 SWF 内容不同的另一个安全域,则页面将对页面域使用默认的应用程序域。



实现
    public function get runtimeApplicationDomain():ApplicationDomain
    public function set runtimeApplicationDomain(value:ApplicationDomain):void

引发
SecurityError — 如果 ApplicationDomain 对象不是来自调用方的安全域。

相关 API 元素

    

scrollH

属性 
scrollH:Number

运行时版本: AIR 1.0

HTMLLoader 对象中的 HTML 内容的水平滚动位置。



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

scrollV

属性 
scrollV:Number

运行时版本: AIR 1.0

HTMLLoader 对象中的 HTML 内容的垂直滚动位置。



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

swfCapability

属性 
swfCapability:int  [只读]

运行时版本: AIR 2

用户系统上的 SWF 支持类型,它被定义为整数代码值。只有在此属性的计算结果为 HTMLSWFCapability.STATUS_OK 时,HTMLLoader 对象才能显示 SWF 内容。HTMLSWFCapability 类为 swfCapability 属性的可能值定义常量,如下所示:

HTMLSWFCapability 常量意义
STATUS_OK已检测到 Adobe Flash Player 足够新的版本,可以在 HTMLLoader 对象中加载 SWF 内容。
ERROR_INSTALLED_PLAYER_NOT_FOUND未检测到任何 Adobe Flash Player 版本。HTMLLoader 对象无法显示 SWF 内容。
ERROR_INSTALLED_PLAYER_TOO_OLD已检测到 Adobe Flash Player,但版本太旧。HTMLLoader 对象无法显示 SWF 内容。



实现
    public static function get swfCapability():int

相关 API 元素

    

textEncodingFallback

属性 
textEncodingFallback:String

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

在 HTML 页未指定字符编码时 HTMLLoader 内容使用的字符编码。HTML 页在 meta 标记中指定字符编码,如下所示:

<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1">

有效的字符集 的 IANA 列表中定义值。

如果 HTML 页、textEncodingFallback 属性或 textEncodingOverride 属性未指定编码,则 HTML 内容将使用 ISO-8859-1 编码。



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

相关 API 元素

    

textEncodingOverride

属性 
textEncodingOverride:String

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

HTMLLoader 内容使用的字符编码,它将覆盖 HTML 页中的任何设置。HTML 页在 meta 标记中指定字符编码,如下所示:

<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1">

此设置也覆盖 textEncodingFallback 属性中的任何设置。

有效的字符集 的 IANA 列表中定义值。

加载 HTML 内容后设置 textEncodingOverride 属性可以让 AIR 使用指定编码刷新 HTML 内容。HTMLLoader 导航到新页面后,如果希望新页面使用特定编码,则需要再次设置此属性。

如果 HTML 页、textEncodingFallback 属性或 textEncodingOverride 属性未指定编码,则 HTML 内容将使用 ISO-8859-1 编码。

textEncodingOverride 属性设置为 null 可恢复默认行为。



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

相关 API 元素

    

useCache

属性 
useCache:Boolean

语言版本: ActionScript 3.0
运行时版本: AIR 1.0

指定在此对象发出的 HTTP 请求获取数据之前是否应查询本地缓存。

默认值为 initialized from URLRequestDefaults.useCache。



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

相关 API 元素

    

userAgent

属性 
userAgent:String

运行时版本: AIR 1.0

来自此 HTMLLoader 对象的任何后续内容请求中使用的用户代理字符串。

要设置用户代理字符串,请在调用 load() 方法之前设置 HTMLLoader 对象的 userAgent 属性。 使用传递到 load() 方法的 URLRequest 对象的 userAgent 属性。

通过设置 URLRequestDefaults.userAgent 属性,可以设置应用程序域中所有 HTMLLoader 对象使用的默认用户代理字符串。如果未为 HTMLLoader 对象的 userAgent 属性设置值(或者将该值设置为 null),则会将用户代理字符串设置为静态 URLRequestDefaults.userAgent 属性的值。

如果既未为 HTMLLoader 的 userAgent 属性设置值,也未为 URLRequestDefaults.userAgent 设置值,则会使用默认值作为用户代理字符串。此默认值随着运行时操作系统(如 Mac OS、Linux 或 Windows)、运行时语言和运行时版本而变化,如下面的示例所示:

  • "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5"
  • "Mozilla/5.0 (Windows; U; en) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5"
  • "Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/526.9+ (KHTML, like Gecko) AdobeAIR/1.5"



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

相关 API 元素

    

width

属性 
width:Number[覆盖]

运行时版本: AIR 1.0

指定所呈现的 HTML 画布的矩形宽度。这是 HTMLLoader 显示对象的宽度(以像素为单位)。width 的最大值是 4095 像素。更改此属性将导致 HTMLLoader 对象重新呈现 HTML 文档。可以调度 htmlBoundsChange 事件以响应此属性的更改。在设置 HTMLLoader 对象的 widthheight 属性时,该对象的范围将发生更改,但内容不会缩放(其他类型的显示对象将会发生缩放)。



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

window

属性 
window:Object  [只读]

运行时版本: AIR 1.0

加载到 HTML 控件中的内容的全局 JavaScript 对象。



实现
    public function get window():Object
构造函数详细信息
    

HTMLLoader

()构造函数
public function HTMLLoader()

运行时版本: AIR 1.0

创建 HTMLLoader 对象。

方法详细信息

    cancelLoad

()方法
public function cancelLoad():void

运行时版本: AIR 1.0

取消正在进行的任何加载操作。

    createRootWindow

()方法 
public static function createRootWindow(visible:Boolean = true, windowInitOptions:NativeWindowInitOptions = null, scrollBarsVisible:Boolean = true, bounds:Rectangle = null):flash.html:HTMLLoader

运行时版本: AIR 1.0

创建新的 NativeWindow 对象,其中包含 HTMLLoader 对象。使用由此方法返回的 HTMLLoader 对象可加载 HTML 内容。

默认情况下(在调用此方法时不设置任何参数),新窗口将使用标准系统镶边并对内容包括滚动条控件。可以设置参数以更改新窗口的属性。

随着窗口加载内容并应用样式表,可能会发生较小的图形故障。要防止此类不连续性可见,请将 visible 参数设置为 false。当窗口加载和布置其内容后,可以通过将 window.nativeWindow.visible 属性设置为 true 来显示该内容或调用 window.nativeWindow.activate() 方法。

参数

visible:Boolean (default = true) — 指定该窗口是否可见。
 
windowInitOptions:NativeWindowInitOptions (default = null) — 指定窗口初始化选项;如果为 null,则使用默认的 NativeWindowInitOptions 值。
 
scrollBarsVisible:Boolean (default = true) — 指定该窗口是否提供滚动条。
 
bounds:Rectangle (default = null) — 如果不为 null,则指定窗口范围。如果 xywidthheight 中的任何一个为 NaN,则该窗口的相应尺寸将保留为其默认值。

返回
flash.html:HTMLLoader — 位于新 NativeWindow 对象的舞台上的新 HTMLLoader 对象。

    getHistoryAt

()方法 
public function getHistoryAt(position:uint):flash.html:HTMLHistoryItem

运行时版本: AIR 1.0

返回指定位置的历史记录条目。

参数

position:uint — 历史记录列表中的位置。

返回
flash.html:HTMLHistoryItem — 位于指定位置的历史记录条目的 URLRequest 对象。

相关 API 元素

    historyBack

()方法 
public function historyBack():void

运行时版本: AIR 1.0

如果可能,在浏览器历史记录中向后浏览。

调用 HTMLLoader 对象的此方法与调用 HTML 页中 JavaScript 中的 window.history 属性的 back() 方法具有相同的效果。

此函数不引发错误。

相关 API 元素

    historyForward

()方法 
public function historyForward():void

运行时版本: AIR 1.0

如果可能,在浏览器历史记录中向前浏览。

调用 HTMLLoader 对象的此方法与调用 HTML 页中 JavaScript 中的 window.history 属性的 forward() 方法具有相同的效果。

此函数不引发错误。

相关 API 元素

    historyGo

()方法 
public function historyGo(steps:int):void

运行时版本: AIR 1.0

在浏览器历史记录中浏览指定的步骤数。如果为正数,则向前导航;如果为负数,则向后导航。零导航强制重新加载。

此方法等效于调用 HTML 页中 JavaScript 中的 window.history 属性的 go() 方法。

此函数不引发错误。

参数

steps:int — 历史记录列表中要向前移动(正数)或向后移动(负数)的步骤数。

相关 API 元素

    load

()方法 
public function load(urlRequestToLoad:URLRequest):void

运行时版本: AIR 1.0

使用 urlRequestToLoad 参数指定的站点中的数据加载 HTMLLoader 对象。初始调用此方法时会将 loaded 属性设置为 false。此方法启动一个始终异步完成的操作。

调用此方法可隐式取消用此方法或 loadString() 方法初始化的任何先前未处理的加载操作。永远不会传送先前加载操作的 complete 事件。

有可能永远不会传送 complete 事件。如果加载到 HTMLLoader 对象中的任何 HTML 内容不能完全下载,则会发生这种情况。如果 HTML 内容引用了到无限反复生成内容的 CGI 脚本的 URL,则会发生这种情况。

参数

urlRequestToLoad:URLRequest — 包含有关要加载的 URL 的信息的 URLRequest 对象。除了要加载的 URL 以外,URLRequest 对象还包含定义 HTTP 式提交方法(GET 或 POST)的属性、要与请求一起传输的任何数据和请求标头。

相关 API 元素

    loadString

()方法 
public function loadString(htmlContent:String):void

运行时版本: AIR 1.0

使用 HTML 字符串中包含的 HTML 内容加载 HTMLLoader 对象。当字符串中的 HTML 呈现完毕时,将调度 complete 事件。complete 事件始终异步调度。

调用此方法可隐式取消用此方法或 load() 方法初始化的任何先前未处理的加载操作。永远不会传送先前加载操作的 complete 事件。

如果字符串中指定的 HTML 不引用外部资源,则此方法将同步呈现 HTML。不过,complete 事件仍将异步调度。如果此类的 loaded 属性为 true,则在调用此函数后,会立即同步呈现 htmlContent 参数中指定的 HTML 内容。

有可能永远不会传送 complete 事件。如果加载到 HTMLLoader 对象中的任何 HTML 内容不能完全下载,则会发生这种情况。如果 HTML 内容引用了到无限反复生成内容的 CGI 脚本的 URL,则会发生这种情况。

只有在将 placeLoadStringContentInApplicationSandbox 属性设置为 true 时,通过 loadString() 方法加载的内容才会放置在应用程序安全沙箱中。

参数

htmlContent:String — 包含要加载到 HTMLLoader 对象中的 HTML 内容的字符串。

相关 API 元素

    reload

()方法 
public function reload():void

运行时版本: AIR 1.0

从当前位置重新加载页面。

事件详细信息
    

complete

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

运行时版本: AIR 1.0

指出 loadStringload 方法上次请求的加载操作已完成。对 HTMLLoader 对象中的 HTML DOM 引发 JavaScript load 事件之后 调度此事件。此事件始终异步调度。此事件的事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。

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

此事件具有以下属性:

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

相关 API 元素

    

htmlBoundsChange

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

运行时版本: AIR 1.0

指出 HTMLLoader 对象的 contentWidth 和/或 contentHeight 属性已发生更改。例如,这可能是加载新图像或其他内容的结果。事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。

HTMLLoader 对象可以在加载操作初始化后的任何时间,甚至是在已调度 complete 事件后,调度此事件。

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

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTargetHTMLLoader 对象。
targetHTMLLoader 对象。

相关 API 元素

    

htmlDOMInitialize

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

运行时版本: AIR 1.0

指出已创建 HTML DOM 以响应加载操作。在调度此事件时,HTMLLoader 对象的 load()loadString() 方法将引发异常。在调度此事件时,可从 HTMLLoader 对象(控制 HTMLLoader 对象中加载的 URL)的 window 属性访问的任何 JavaScript 对象的任何属性或方法在进行设置或调用时会引发异常。例如,通过设置 HTMLLoader 对象的 window 属性来设置 window.location 会导致 JavaScript 异常。

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

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTargetHTMLLoader 对象。
targetHTMLLoader 对象。

相关 API 元素

    

htmlRender

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

运行时版本: AIR 1.0

指出 HTMLLoader 对象中的内容呈现完全处于最新状态。可以相当频繁地调度此事件,即每当对 HTML 内容进行任何呈现更改时。例如,当因为用户单击某一链接而显示新内容或页面中的 JavaScript 呈现 HTML 时,将调度此事件。事件侦听器可以调用 HTMLLoader 对象的任何方法或访问其任何属性。

此事件的处理函数应该检查 HTMLLoader 对象的 contentWidthcontentHeight 属性以更新与该对象相关联的任何滚动条。

HTMLLoader 对象可以在加载操作初始化后的任何时间,甚至是在已调度 complete 事件后,调度此事件。

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

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTargetHTMLLoader 对象。
targetHTMLLoader 对象。
    

locationChange

事件  
事件对象类型: flash.events.LocationChangeEvent
属性 LocationChangeEvent.type = flash.events.LocationChangeEvent.LOCATION_CHANGE

运行时版本: AIR 2.7

指出更改了 HTMLLoader 对象的 location 属性。此事件的事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。

在使用 AIR 命名空间 2.7 和更高版本的应用程序中,HTMLLoader 调度 LocationChangeEvent 类型的 locationChange 事件。在 AIR 早期版本中,调度的事件对象是 Event 类的一个实例。

在每个位置更改后调度。

相关 API 元素

    

locationChange

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

运行时版本: AIR 1.0

指出更改了 HTMLLoader 对象的 location 属性。此事件的事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。

在使用低于 2.7 版本的 AIR 命名空间的应用程序中,HTMLLoader 调度 Event 类型的 locationChange 事件。在 AIR 2.7 和更高版本中,事件对象是 LocationChangeEvent 类的一个实例,该类为新的页面 URL 提供了一个附加的 location 属性集。

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

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTargetHTMLLoader 对象。
targetHTMLLoader 对象。

相关 API 元素

    

locationChanging

事件  
事件对象类型: flash.events.LocationChangeEvent
属性 LocationChangeEvent.type = flash.events.LocationChangeEvent.LOCATION_CHANGING

语言版本: ActionScript 3.0
运行时版本: AIR 2.7

表示 HTMLLoader 对象的 location 属性即将更改。

仅当通过用户交互(如在用户单击一个链接时)或者由 HTMLLoader 内部运行的代码(如客户端重定向)启动位置更改时才调度 locationChanging 事件。默认情况下,新位置在此 HTMLLoader 对象中显示。您可以调用事件对象的 preventDefault() 方法取消默认行为。例如,您可以使用 flash.net.navigateToURL() 函数在基于事件对象的 location 属性的系统浏览器中打开页面。

当调用下列方法时,不会调度 locationChanging() 事件:

  • load()
  • loadString()
  • reload()
  • historyBack()
  • historyForward()
  • historyGo()

此外,当 navigateInSystemBrowser 属性为 true 并且在系统浏览器中打开了目标页面时,不会调度此事件,原因是 HTMLLoader 位置未更改。

LOCATION_CHANGING 常量定义在页面位置发生更改之前调度的 LocationChangeEvent 对象的 type 属性的值。
示例  ( 如何使用本示例 )

下面的代码初始化一个 HTMLLoader 对象,配置其宽度和高度,加载 URL http://www.adobe.com 并将该对象添加到显示列表中。如果用户(或页面上的 JavaScript)尝试导航到不以基本 URL 开头的 URL,则导航被阻止:
package{
    import flash.display.Sprite;
    import flash.html.HTMLLoader;
    import flash.net.URLRequest;
    
    public class LocationChanging extends Sprite
    {
        var htmlLoader:HTMLLoader = new HTMLLoader();
        public function LocationChanging()
        {
            htmlLoader.width = stage.stageWidth;
            htmlLoader.height = stage.stageHeight;        
            htmlLoader.addEventListener( LocationChangeEvent.LOCATION_CHANGING, onLocationChanging );
            htmlLoader.load( new URLRequest( "http://www.adobe.com" ) );
            this.addChild( htmlLoader );
        }
    
        private function onLocationChanging( event:LocationChangeEvent ):void
        {
            trace( "Location changing: " + event.location );
        
            if ( event.location.indexOf( "http://www.adobe.com" ) < 0 ) 
            {
                event.preventDefault();
            }
        }
    }
}
    

scroll

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

运行时版本: AIR 1.0

指出 scrollHscrollV 属性已被 HTMLLoader 对象更改。当 HTMLLoader 对象中运行的 JavaScript 调用 window 对象的 scrollTo() 方法且需要的位置尚不可见时,HTMLLoader 对象调度此事件。当 ActionScript 代码更改 scrollHscrollV 属性时,不调度此事件。事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。

此事件的事件处理函数应该检查 scrollHscrollV 属性以更新与 HTMLLoader 对象相关联的任何滚动条。

HTMLLoader 对象可以在加载操作初始化后的任何时间,甚至是在已调度 complete 事件后,调度此事件。

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

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
currentTarget当前正在使用某个事件侦听器处理 Event 对象的对象。
target已滚动的 TextField 对象。target 属性不一定是显示列表中注册此事件侦听器的对象。请使用 currentTarget 属性来访问显示列表中当前正在处理此事件的对象。
    

uncaughtScriptException

事件  
事件对象类型: flash.events.HTMLUncaughtScriptExceptionEvent
属性 HTMLUncaughtScriptExceptionEvent.type = flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION

运行时版本: AIR 1.0

指出在 HTMLLoader 对象中发生了未捕获的 JavaScript 异常。事件处理函数可以调用 HTMLLoader 对象的任何方法或访问该对象的任何属性。该事件可以取消,在 AIR Debug Launcher 中运行时,其默认行为是将 JavaScript 堆栈发送到跟踪输出。

HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION 常量定义 uncaughtScriptException 事件对象的 type 属性值。

此事件具有以下属性:

属性
bubblesfalse
cancelablefalse;没有要取消的默认行为。
exceptionValue计算产生未捕获的异常的 throw 语句中的表达式的结果。
stackTrace表示在执行产生未捕获的异常的 throw 语句时的堆栈跟踪的对象数组。
targetHTMLLoader 对象。

相关 API 元素

HTMLLoader.1.as

下面的代码初始化一个 HTMLLoader 对象、配置其宽度和高度、加载 URL http://www.adobe.com 并将该对象添加到显示列表中:
package {
    import flash.display.Sprite;
    import flash.html.HTMLLoader;
    import flash.net.URLRequest;

    public class HTMLLoaderExample extends Sprite
    {
        public function HTMLLoaderExample()
        {
            var html:HTMLLoader = new HTMLLoader();
            var urlReq:URLRequest = new URLRequest("http://www.adobe.com/");
            html.width = stage.stageWidth;
            html.height = stage.stageHeight;
            html.load(urlReq); 
            addChild(html);
        }
    }
}




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

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