Package | flash.html |
Class | public class HTMLLoader |
Inheritance | HTMLLoader Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object |
Subclasses | FlexHTMLLoader |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
AIR profile support: This feature is supported
on all desktop operating systems, but is not supported on mobile devices or on AIR for TV devices. You can test
for support at run time using the HTMLLoader.isSupported
property. See
AIR Profile Support for more information regarding API support across multiple profiles.
The default dimensions of an HTMLLoader are 0 x 0 pixels. Set the width
and height
properties to make the HTMLLoader object visible.
The maximum size for an HTMLLoader object is 4,096 pixels in height and 4,096 pixels in width.
Setting width
or height
of an HTMLLoader object to a number that exceeds
4,095 causes the HTMLLoader object to throw an ArgumentError exception. (Note, prior to AIR 2, the
maximum size of HTMLLoader object wss 2,880 pixels.)
Note: When displayed in a transparent window, SWF content embedded
in an HTML page must be embedded using either the transparent
or opaque
wmode.
The default value for wmode is window
, so if you do not specify a value, SWF content
may not be displayed. On Windows and Linux, SWF content always appears on top of other content
when wmode
is set to window
or opaque
. PDF content
cannot be displayed in a transparent window no matter which wmode
setting is used.
More examples
Drag and drop in HTML
About context menus in HTML (AIR)
About the HTML environment
Programming HTML and JavaScript in AIR
Important security rules when using HTML in AIR applications
Avoiding security-related JavaScript errors
Using the AIRAliases.js file
Embedding SWF content in HTML
Cross-scripting content in different security sandboxes
Setting up a sandbox bridge interface
Scripting the AIR HTML Container
Handling HTML-related events in AIR
Property | Defined By | ||
---|---|---|---|
accessibilityImplementation : AccessibilityImplementation
The current accessibility implementation (AccessibilityImplementation)
for this InteractiveObject instance. | InteractiveObject | ||
accessibilityProperties : AccessibilityProperties
The current accessibility options for this display object. | DisplayObject | ||
alpha : Number
Indicates the alpha transparency value of the object specified. | DisplayObject | ||
authenticate : Boolean
Specifies whether authentication requests should be handled (true)
or not (false) for HTTP requests issued by this object. | HTMLLoader | ||
blendMode : String
A value from the BlendMode class that specifies which blend mode to use. | DisplayObject | ||
blendShader : Shader [write-only]
Sets a shader that is used for blending the foreground and background. | DisplayObject | ||
buttonMode : Boolean
Specifies the button mode of this sprite. | Sprite | ||
cacheAsBitmap : Boolean
If set to true, Flash runtimes cache an internal bitmap representation of the
display object. | DisplayObject | ||
cacheAsBitmapMatrix : Matrix
If non-null, this Matrix object defines how a display object is rendered when
cacheAsBitmap is set to true. | DisplayObject | ||
cacheResponse : Boolean
Specifies whether successful response data should be cached for HTTP requests issued by this object. | HTMLLoader | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
contentHeight : Number [read-only]
The height, in pixels, of the HTML content. | HTMLLoader | ||
contentWidth : Number [read-only]
The width, in pixels, of the HTML content. | HTMLLoader | ||
contextMenu : NativeMenu
Specifies the context menu associated with this object. | InteractiveObject | ||
doubleClickEnabled : Boolean
Specifies whether the object receives doubleClick events. | InteractiveObject | ||
dropTarget : DisplayObject [read-only]
Specifies the display object over which the sprite is being dragged, or on
which the sprite was dropped. | Sprite | ||
filters : Array
An indexed array that contains each filter object currently associated with the display object. | DisplayObject | ||
focusRect : Object
Specifies whether this object displays a focus rectangle. | InteractiveObject | ||
graphics : Graphics [read-only]
Specifies the Graphics object that belongs to this sprite where vector
drawing commands can occur. | Sprite | ||
hasFocusableContent : Boolean [read-only]
Indicates whether any content in the HTMLLoader object is focusable. | HTMLLoader | ||
height : Number [override]
Specifies the height of the rectangle of the HTML canvas that is being rendered. | HTMLLoader | ||
historyLength : uint [read-only]
The overall length of the history list, including back and forward entries. | HTMLLoader | ||
historyPosition : uint
The current position in the history list. | HTMLLoader | ||
hitArea : Sprite
Designates another sprite to serve as the hit area for a sprite. | Sprite | ||
htmlHost : flash.html:HTMLHost
The HTMLHost object used to handle changes to certain user interface elements, such as the
window.document.title property of the HTMLLoader object. | HTMLLoader | ||
idleTimeout : Number
Specifies the idle timeout value (in milliseconds) for HTTP requests issued by this object. | HTMLLoader | ||
isSupported : Boolean [static] [read-only]
Indicates whether the HTMLLoader class is supported on the client system. | HTMLLoader | ||
loaded : Boolean [read-only]
Indicates whether the JavaScript load event corresponding to the previous call to the
load() or loadString() method has been delivered to
the HTML DOM in the HTMLLoader object. | HTMLLoader | ||
loaderInfo : LoaderInfo [read-only]
Returns a LoaderInfo object containing information about loading the file
to which this display object belongs. | DisplayObject | ||
location : String [read-only]
The URL for the content loaded in the HTMLLoader object. | HTMLLoader | ||
manageCookies : Boolean
Specifies whether the HTTP protocol stack should manage cookies for this
object. | HTMLLoader | ||
mask : DisplayObject
The calling display object is masked by the specified mask object. | DisplayObject | ||
mouseChildren : Boolean
Determines whether or not the children of the object are mouse, or user input device, enabled. | DisplayObjectContainer | ||
mouseEnabled : Boolean
Specifies whether this object receives mouse, or other user input, messages. | InteractiveObject | ||
mouseX : Number [read-only]
Indicates the x coordinate of the mouse or user input device position, in pixels. | DisplayObject | ||
mouseY : Number [read-only]
Indicates the y coordinate of the mouse or user input device position, in pixels. | DisplayObject | ||
name : String
Indicates the instance name of the DisplayObject. | DisplayObject | ||
navigateInSystemBrowser : Boolean
Specifies whether navigation of the root frame of the HTML content (such as when the user clicks a link, when the
window.location property is set, or when calling window.open()) results in
navigation in the HTMLLoader object (false) or in the default system web browser
(true). | HTMLLoader | ||
needsSoftKeyboard : Boolean
Specifies whether a virtual keyboard (an on-screen, software keyboard) should display
when this InteractiveObject instance receives focus. | InteractiveObject | ||
numChildren : int [read-only]
Returns the number of children of this object. | DisplayObjectContainer | ||
opaqueBackground : Object
Specifies whether the display object is opaque with a certain background color. | DisplayObject | ||
paintsDefaultBackground : Boolean
Specifies whether the background of the HTMLLoader document is opaque white (true) or
not (false). | HTMLLoader | ||
parent : DisplayObjectContainer [read-only]
Indicates the DisplayObjectContainer object that contains this display object. | DisplayObject | ||
pdfCapability : int [static] [read-only]
The type of PDF support on the user's system, defined as an integer code value. | HTMLLoader | ||
placeLoadStringContentInApplicationSandbox : Boolean
Specifies whether content loaded via the loadString() method is put in
the application sandbox (true) or in a non-application sandbox
(false). | HTMLLoader | ||
prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | ||
root : DisplayObject [read-only]
For a display object in a loaded SWF file, the root property is the
top-most display object in the portion of the display list's tree structure represented by that SWF file. | DisplayObject | ||
rotation : Number
Indicates the rotation of the DisplayObject instance, in degrees, from its original orientation. | DisplayObject | ||
rotationX : Number
Indicates the x-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
rotationY : Number
Indicates the y-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
rotationZ : Number
Indicates the z-axis rotation of the DisplayObject instance, in degrees, from its original orientation relative to the 3D parent container. | DisplayObject | ||
runtimeApplicationDomain : ApplicationDomain
The application domain to use for the window.runtime object in JavaScript
in the HTML page. | HTMLLoader | ||
scale9Grid : Rectangle
The current scaling grid that is in effect. | DisplayObject | ||
scaleX : Number
Indicates the horizontal scale (percentage) of the object as applied from the registration point. | DisplayObject | ||
scaleY : Number
Indicates the vertical scale (percentage) of an object as applied from the registration point of the object. | DisplayObject | ||
scaleZ : Number
Indicates the depth scale (percentage) of an object as applied from the registration point of the object. | DisplayObject | ||
scrollH : Number
The horizontal scroll position of the HTML content in the HTMLLoader object. | HTMLLoader | ||
scrollRect : Rectangle
The scroll rectangle bounds of the display object. | DisplayObject | ||
scrollV : Number
The vertical scroll position of the HTML content in the HTMLLoader object. | HTMLLoader | ||
softKeyboardInputAreaOfInterest : Rectangle
Defines the area that should remain on-screen when a soft keyboard is displayed. | InteractiveObject | ||
soundTransform : flash.media:SoundTransform
Controls sound within this sprite. | Sprite | ||
stage : Stage [read-only]
The Stage of the display object. | DisplayObject | ||
swfCapability : int [static] [read-only]
The type of SWF support on the user's system, defined as an integer code value. | HTMLLoader | ||
tabChildren : Boolean
Determines whether the children of the object are tab enabled. | DisplayObjectContainer | ||
tabEnabled : Boolean
Specifies whether this object is in the tab order. | InteractiveObject | ||
tabIndex : int
Specifies the tab ordering of objects in a SWF file. | InteractiveObject | ||
textEncodingFallback : String
The character encoding used by the HTMLLoader content if an HTML page does not specify
a character encoding. | HTMLLoader | ||
textEncodingOverride : String
The character encoding used by the HTMLLoader content, overriding any setting in the HTML page. | HTMLLoader | ||
textSnapshot : flash.text:TextSnapshot [read-only]
Returns a TextSnapshot object for this DisplayObjectContainer instance. | DisplayObjectContainer | ||
transform : flash.geom:Transform
An object with properties pertaining to a display object's matrix, color transform, and pixel bounds. | DisplayObject | ||
useCache : Boolean
Specifies whether the local cache should be consulted before HTTP requests issued by this object
fetch data. | HTMLLoader | ||
useHandCursor : Boolean
A Boolean value that indicates whether the pointing hand (hand cursor) appears when the pointer rolls
over a sprite in which the buttonMode property is set to true. | Sprite | ||
userAgent : String
The user agent string to be used in any upcoming content requests from this HTMLLoader
object. | HTMLLoader | ||
visible : Boolean
Whether or not the display object is visible. | DisplayObject | ||
width : Number [override]
Specifies the width of the rectangle of the HTML canvas that is being rendered. | HTMLLoader | ||
window : Object [read-only]
The global JavaScript object for the content loaded into the HTML control. | HTMLLoader | ||
x : Number
Indicates the x coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer. | DisplayObject | ||
y : Number
Indicates the y coordinate of the DisplayObject instance relative to the local coordinates of
the parent DisplayObjectContainer. | DisplayObject | ||
z : Number
Indicates the z coordinate position along the z-axis of the DisplayObject
instance relative to the 3D parent container. | DisplayObject |
Method | Defined By | ||
---|---|---|---|
Creates an HTMLLoader object. | HTMLLoader | ||
Adds a child DisplayObject instance to this DisplayObjectContainer instance. | DisplayObjectContainer | ||
Adds a child DisplayObject instance to this DisplayObjectContainer
instance. | DisplayObjectContainer | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | ||
Indicates whether the security restrictions
would cause any display objects to be omitted from the list returned by calling
the DisplayObjectContainer.getObjectsUnderPoint() method
with the specified point point. | DisplayObjectContainer | ||
Cancels any load operation in progress. | HTMLLoader | ||
Determines whether the specified display object is a child of the DisplayObjectContainer instance or
the instance itself. | DisplayObjectContainer | ||
createRootWindow(visible:Boolean = true, windowInitOptions:NativeWindowInitOptions = null, scrollBarsVisible:Boolean = true, bounds:Rectangle = null):flash.html:HTMLLoader [static]
Creates a new NativeWindow object that contains an HTMLLoader object. | HTMLLoader | ||
Dispatches an event into the event flow. | EventDispatcher | ||
Returns a rectangle that defines the area of the display object relative to the coordinate system
of the targetCoordinateSpace object. | DisplayObject | ||
Returns the child display object instance that exists at the specified index. | DisplayObjectContainer | ||
Returns the child display object that exists with the specified name. | DisplayObjectContainer | ||
Returns the index position of a child DisplayObject instance. | DisplayObjectContainer | ||
Returns the history entry at the specified position. | HTMLLoader | ||
Returns an array of objects that lie under the specified point and are children
(or grandchildren, and so on) of this DisplayObjectContainer instance. | DisplayObjectContainer | ||
Returns a rectangle that defines the boundary of the display object,
based on the coordinate system defined by the targetCoordinateSpace
parameter, excluding any strokes on shapes. | DisplayObject | ||
Converts the point object from the Stage (global) coordinates
to the display object's (local) coordinates. | DisplayObject | ||
Converts a two-dimensional point from the Stage (global) coordinates to a
three-dimensional display object's (local) coordinates. | DisplayObject | ||
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | ||
Indicates whether an object has a specified property defined. | Object | ||
Navigates back in the browser history, if possible. | HTMLLoader | ||
Navigates forward in the browser history, if possible. | HTMLLoader | ||
Navigates the specified number of steps in the browser history. | HTMLLoader | ||
Evaluates the bounding box of the display object to see if it overlaps or intersects with the
bounding box of the obj display object. | DisplayObject | ||
Evaluates the display object to see if it overlaps or intersects with the
point specified by the x and y parameters. | DisplayObject | ||
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | ||
Loads the HTMLLoader object with data from the site specified by the urlRequestToLoad parameter. | HTMLLoader | ||
Loads the HTMLLoader object with the HTML content contained in the HTML string. | HTMLLoader | ||
Converts a three-dimensional point of the three-dimensional display
object's (local) coordinates to a two-dimensional point in the Stage (global) coordinates. | DisplayObject | ||
Converts the point object from the display object's (local) coordinates to the
Stage (global) coordinates. | DisplayObject | ||
Indicates whether the specified property exists and is enumerable. | Object | ||
Reloads the page from the current location. | HTMLLoader | ||
Removes the specified child DisplayObject instance from the child list of the DisplayObjectContainer instance. | DisplayObjectContainer | ||
Removes a child DisplayObject from the specified index position in the child list of
the DisplayObjectContainer. | DisplayObjectContainer | ||
Removes one or more child DisplayObject instances from the DisplayObjectContainer instance. | DisplayObjectContainer | ||
Removes a listener from the EventDispatcher object. | EventDispatcher | ||
Raises a virtual keyboard. | InteractiveObject | ||
Changes the position of an existing child in the display object container. | DisplayObjectContainer | ||
Sets the availability of a dynamic property for loop operations. | Object | ||
Lets the user drag the specified sprite. | Sprite | ||
Lets the user drag the specified sprite on a touch-enabled device. | Sprite | ||
Ends the startDrag() method. | Sprite | ||
Ends the startTouchDrag() method, for use with touch-enabled devices. | Sprite | ||
Swaps the z-order (front-to-back order) of the two specified child objects. | DisplayObjectContainer | ||
Swaps the z-order (front-to-back order) of the child objects at the two specified index positions in the
child list. | DisplayObjectContainer | ||
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | ||
Returns the string representation of the specified object. | Object | ||
Returns the primitive value of the specified object. | Object | ||
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher |
Event | Summary | Defined By | ||
---|---|---|---|---|
[broadcast event] Dispatched when the Flash Player or AIR application gains operating system focus and becomes active. | EventDispatcher | |||
Dispatched when a display object is added to the display list. | DisplayObject | |||
Dispatched when a display object is added to the on stage display list, either directly or through the addition of a sub tree in which the display object is contained. | DisplayObject | |||
Dispatched when the user selects 'Clear' (or 'Delete') from the text context menu. | InteractiveObject | |||
Dispatched when a user presses and releases the main button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Signals that the last load operation requested by loadString or load method has completed. | HTMLLoader | |||
Dispatched when a user gesture triggers the context menu associated with this interactive object in an AIR application. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a copy operation or selects 'Copy' from the text context menu. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a cut operation or selects 'Cut' from the text context menu. | InteractiveObject | |||
[broadcast event] Dispatched when the Flash Player or AIR application operating loses system focus and is becoming inactive. | EventDispatcher | |||
Dispatched when a user presses and releases the main button of a pointing device twice in rapid succession over the same InteractiveObject when that object's doubleClickEnabled flag is set to true. | InteractiveObject | |||
[broadcast event] Dispatched when the playhead is entering a new frame. | DisplayObject | |||
[broadcast event] Dispatched when the playhead is exiting the current frame. | DisplayObject | |||
Dispatched after a display object gains focus. | InteractiveObject | |||
Dispatched after a display object loses focus. | InteractiveObject | |||
[broadcast event] Dispatched after the constructors of frame display objects have run but before frame scripts have run. | DisplayObject | |||
Dispatched when the user moves a point of contact over the InteractiveObject instance on a touch-enabled device (such as moving a finger from left to right over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user creates a point of contact with an InteractiveObject instance, then taps on a touch-enabled device (such as placing several fingers over a display object to open a menu and then taps one finger to select a menu item on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a rotation gesture at a point of contact with an InteractiveObject instance (such as touching two fingers and rotating them over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a swipe gesture at a point of contact with an InteractiveObject instance (such as touching three fingers to a screen and then moving them in parallel over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user presses two points of contact over the same InteractiveObject instance on a touch-enabled device (such as presses and releases two fingers over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user performs a zoom gesture at a point of contact with an InteractiveObject instance (such as touching two fingers to a screen and then quickly spreading the fingers apart over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Signals that one or both of the contentWidth and contentHeight properties of the HTMLLoader object has changed. | HTMLLoader | |||
Signals that the HTML DOM has been created in response to a load operation. | HTMLLoader | |||
Signals that the rendering of content in the HTMLLoader object is fully up to date. | HTMLLoader | |||
This event is dispatched to any client app that supports inline input with an IME | InteractiveObject | |||
Dispatched when the user presses a key. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using keyboard navigation. | InteractiveObject | |||
Dispatched when the user releases a key. | InteractiveObject | |||
Signals that the location property of the HTMLLoader object has changed. | HTMLLoader | |||
Signals that the location property of the HTMLLoader object has changed. | HTMLLoader | |||
Signals that the location property of the HTMLLoader object is about to change. | HTMLLoader | |||
Dispatched when a user presses and releases the middle button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the middle pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user attempts to change focus by using a pointer device. | InteractiveObject | |||
Dispatched when a user moves the pointing device while it is over an InteractiveObject. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a mouse wheel is spun over an InteractiveObject instance. | InteractiveObject | |||
Dispatched by the drag initiator InteractiveObject when the user releases the drag gesture. | InteractiveObject | |||
Dispatched by the target InteractiveObject when a dragged object is dropped on it and the drop has been accepted with a call to DragManager.acceptDragDrop(). | InteractiveObject | |||
Dispatched by an InteractiveObject when a drag gesture enters its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject when a drag gesture leaves its boundary. | InteractiveObject | |||
Dispatched by an InteractiveObject continually while a drag gesture remains within its boundary. | InteractiveObject | |||
Dispatched at the beginning of a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched during a drag operation by the InteractiveObject that is specified as the drag initiator in the DragManager.doDrag() call. | InteractiveObject | |||
Dispatched when the user activates the platform-specific accelerator key combination for a paste operation or selects 'Paste' from the text context menu. | InteractiveObject | |||
Dispatched when the user lowers an active stylus past the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user lifts an active stylus above the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus over the screen while remaining within the proximity detection threshold. | InteractiveObject | |||
Dispatched when the user moves an active stylus away from this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus directly above this InteractiveObject while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus away from this InteractiveObject and any of its children while remaining within the proximity detection threshold of the screen. | InteractiveObject | |||
Dispatched when the user moves an active stylus over this InteractiveObject from outside the object's tree of descendents in the display list (while remaining within the proximity detection threshold of the screen). | InteractiveObject | |||
Dispatched when a display object is about to be removed from the display list. | DisplayObject | |||
Dispatched when a display object is about to be removed from the display list, either directly or through the removal of a sub tree in which the display object is contained. | DisplayObject | |||
[broadcast event] Dispatched when the display list is about to be updated and rendered. | DisplayObject | |||
Dispatched when a user presses and releases the right button of the user's pointing device over the same InteractiveObject. | InteractiveObject | |||
Dispatched when a user presses the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when a user releases the pointing device button over an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device away from an InteractiveObject instance. | InteractiveObject | |||
Dispatched when the user moves a pointing device over an InteractiveObject instance. | InteractiveObject | |||
Signals that the scrollH or scrollV property has been changed by the HTMLLoader object. | HTMLLoader | |||
Dispatched when the user activates the platform-specific accelerator key combination for a select all operation or selects 'Select All' from the text context menu. | InteractiveObject | |||
Dispatched immediately after the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately before the soft keyboard is raised. | InteractiveObject | |||
Dispatched immediately after the soft keyboard is lowered. | InteractiveObject | |||
Dispatched when the value of the object's tabChildren flag changes. | InteractiveObject | |||
Dispatched when the object's tabEnabled flag changes. | InteractiveObject | |||
Dispatched when the value of the object's tabIndex property changes. | InteractiveObject | |||
Dispatched when a user enters one or more characters of text. | InteractiveObject | |||
Dispatched when the user first contacts a touch-enabled device (such as touches a finger to a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user removes contact with a touch-enabled device (such as lifts a finger off a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact with a touch-enabled device (such as drags a finger across a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact away from InteractiveObject instance on a touch-enabled device (such as drags a finger from one display object to another on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact away from an InteractiveObject instance on a touch-enabled device (such as drags a finger from over a display object to a point outside the display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user moves the point of contact over an InteractiveObject instance on a touch-enabled device (such as drags a finger from a point outside a display object to a point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Dispatched when the user lifts the point of contact over the same InteractiveObject instance on which the contact was initiated on a touch-enabled device (such as presses and releases a finger from a single point over a display object on a mobile phone or tablet with a touch screen). | InteractiveObject | |||
Signals that an uncaught JavaScript exception occurred in the HTMLLoader object. | HTMLLoader |
authenticate | property |
authenticate:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
Specifies whether authentication requests should be handled (true
)
or not (false
) for HTTP requests issued by this object. If false
, authentication
challenges return an HTTP error.
The default value is initialized from URLRequestDefaults.authenticate.
Implementation
public function get authenticate():Boolean
public function set authenticate(value:Boolean):void
Related API Elements
cacheResponse | property |
cacheResponse:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
Specifies whether successful response data should be cached for HTTP requests issued by this object.
When set to true
, the HTMLLoader object uses the operating system's HTTP cache.
The default value is initialized from URLRequestDefaults.cacheResponse.
Implementation
public function get cacheResponse():Boolean
public function set cacheResponse(value:Boolean):void
Related API Elements
contentHeight | property |
contentHeight:Number
[read-only] Runtime Versions: | AIR 1.0 |
The height, in pixels, of the HTML content. This property can change as the dimensions of the HTMLLoader object change.
For example, an HTML page often uses the entire height of the HTMLLoader object, and the contentHeight
property may
change if you change the height of the HTMLLoader object.
Implementation
public function get contentHeight():Number
More examples
contentWidth | property |
contentWidth:Number
[read-only] Runtime Versions: | AIR 1.0 |
The width, in pixels, of the HTML content. This property can change as the dimensions of the HTMLLoader object change.
For example, an HTML page often uses the entire width of the HTMLLoader object, and the contentWidth
property may
change if you change the width of the HTMLLoader object.
Implementation
public function get contentWidth():Number
More examples
hasFocusableContent | property |
height | property |
height:Number
[override] Runtime Versions: | AIR 1.0 |
Specifies the height of the rectangle of the HTML canvas that is being rendered.
This property value is the height of the HTMLLoader display object in pixels. The maximum height
value is 4095 pixels.
Changing this property causes the HTMLLoader object to re-render the HTML document.
htmlBoundsChanged
events may dispatched in response to changing this property.
When you set the width
or
height
property of an HTMLLoader object, the bounds of the object change but
the content is not scaled (as would happen with other types of display objects).
Implementation
override public function get height():Number
override public function set height(value:Number):void
historyLength | property |
historyLength:uint
[read-only] Runtime Versions: | AIR 1.0 |
The overall length of the history list, including back and forward entries.
This property has the same value as the window.history.length
JavaScript property of the HTML page.
Implementation
public function get historyLength():uint
Related API Elements
historyPosition | property |
historyPosition:uint
Runtime Versions: | AIR 1.0 |
The current position in the history list. The history list corresponds to the
window.history
object of the HTML page.
Entries less than the current position are the "back" list; entries greater are "forward."
Attempts to set position beyond the end set it to the end.
Implementation
public function get historyPosition():uint
public function set historyPosition(value:uint):void
Related API Elements
htmlHost | property |
htmlHost:flash.html:HTMLHost
Runtime Versions: | AIR 1.0 |
The HTMLHost object used to handle changes to certain user interface elements, such as the
window.document.title
property of the HTMLLoader object. To override default
behaviors for the HTMLLoader object, create a subclass of the HTMLHost class and override its member
functions to handle various user interface changes in the HTML content.
Implementation
public function get htmlHost():flash.html:HTMLHost
public function set htmlHost(value:flash.html:HTMLHost):void
Related API Elements
idleTimeout | property |
idleTimeout:Number
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2 |
Specifies the idle timeout value (in milliseconds) for HTTP requests issued by this object.
The idle timeout is the amount of time the client waits for a response from the server, after the connection is established, before abandoning the request.
The default value is initialized from URLRequestDefaults.idleTimeout.
Implementation
public function get idleTimeout():Number
public function set idleTimeout(value:Number):void
Related API Elements
isSupported | property |
loaded | property |
loaded:Boolean
[read-only] Runtime Versions: | AIR 1.0 |
Indicates whether the JavaScript load event corresponding to the previous call to the
load()
or loadString()
method has been delivered to
the HTML DOM in the HTMLLoader object.
This property is true
before the complete
event is dispatched.
It is possible that this property will never become true
. This happens in the
same cases as when the complete
event is never dispatched.
Implementation
public function get loaded():Boolean
location | property |
manageCookies | property |
manageCookies:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
Specifies whether the HTTP protocol stack should manage cookies for this
object. If true
, cookies are added to the request
and response cookies are remembered. If false
, cookies are
not added to the request and response cookies are not
remembered.
The default value is initialized from URLRequestDefaults.manageCookies.
Implementation
public function get manageCookies():Boolean
public function set manageCookies(value:Boolean):void
Related API Elements
navigateInSystemBrowser | property |
navigateInSystemBrowser:Boolean
Runtime Versions: | AIR 1.0 |
Specifies whether navigation of the root frame of the HTML content (such as when the user clicks a link, when the
window.location
property is set, or when calling window.open()
) results in
navigation in the HTMLLoader object (false
) or in the default system web browser
(true
). Set this property to true
if you want all navigation to occur in the
system web browser (not in the HTMLLoader object).
The default value is false.
Implementation
public function get navigateInSystemBrowser():Boolean
public function set navigateInSystemBrowser(value:Boolean):void
paintsDefaultBackground | property |
paintsDefaultBackground:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
Specifies whether the background of the HTMLLoader document is opaque white (true
) or
not (false
). If this property is set to false
, the HTMLLoader
object uses its display object container as a background for the HTML and it uses the opacity
(alpha
value) of the display object container as the HTML background. However, if
the body
element or any other element of the HTML document has an opaque background
color (specified by style="background-color:gray"
, for instance), then that portion
of the rendered HTML uses the specified opaque background color.
Implementation
public function get paintsDefaultBackground():Boolean
public function set paintsDefaultBackground(value:Boolean):void
More examples
pdfCapability | property |
pdfCapability:int
[read-only] Runtime Versions: | AIR 1.0 |
The type of PDF support on the user's system, defined as an integer code value.
An HTMLLoader object can display PDF content only if this property evaluates to
PDFCapability.STATUS_OK
. The PDFCapability class defines constants
for possible values of the pdfCapability
property, as follows:
PDFCapability constant | Meaning |
---|---|
STATUS_OK | A sufficient version (8.1 or later) of Acrobat or Adobe Reader is detected and PDF content
can be loaded in an HTMLLoader object.
Note: On Windows, if Acrobat or Adobe Reader version 7.x or later,
is currently running on the user's system, that version is used even if a later version
that supports loading PDF loaded in an HTMLLoader object is installed. In this case,
if the value of the |
ERROR_INSTALLED_READER_NOT_FOUND | No version of Acrobat or Adobe Reader is detected. An HTMLLoader object cannot display PDF content. |
ERROR_INSTALLED_READER_TOO_OLD | Acrobat or Adobe Reader has been detected, but the version is too old. An HTMLLoader object cannot display PDF content. |
ERROR_PREFERED_READER_TOO_OLD | A sufficient version (8.1 or later) of Acrobat or Adobe Reader is detected, but the the version that is set up to handle PDF content is older than 8.1. An HTMLLoader object cannot display PDF content. |
Implementation
public static function get pdfCapability():int
More examples
Related API Elements
placeLoadStringContentInApplicationSandbox | property |
placeLoadStringContentInApplicationSandbox:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.5 |
Specifies whether content loaded via the loadString()
method is put in
the application sandbox (true
) or in a non-application sandbox
(false
).
When this property is set to false
, content loaded via the loadString()
method is placed in a non-application sandbox with the following characteristics:
- It has access to load content from the network (but not from the filesystem).
- It cannot load data using XMLHttpRequest.
- The
window.location
property is set to"about:blank"
. - The content cannot access the
window.runtime
property (like content in any non-application sandbox).
When this property is set to true
, the content loaded via the loadString()
method is placed in the application sandbox, with access to the window.runtime
property
and to all AIR APIs. You should ensure that the data source for a string used in a call to the
loadString()
method is trusted. Code statements in the HTML string are executed with full
application privileges when this property is set to true
. You should only set this property to
true
when you are certain that the string cannot contain harmful code.
In applications compiled with the AIR 1.0 or AIR 1.1 SDKs, content loaded via the loadString()
method is placed in the application sandbox.
The default value is false.
Implementation
public function get placeLoadStringContentInApplicationSandbox():Boolean
public function set placeLoadStringContentInApplicationSandbox(value:Boolean):void
Related API Elements
runtimeApplicationDomain | property |
runtimeApplicationDomain:ApplicationDomain
Runtime Versions: | AIR 1.0 |
The application domain to use for the window.runtime
object in JavaScript
in the HTML page.
If null
, or if the HTML content is from a different
security domain than the SWF content that contains the HTMLLoader object, the page uses
a default application domain for its domain.
Implementation
public function get runtimeApplicationDomain():ApplicationDomain
public function set runtimeApplicationDomain(value:ApplicationDomain):void
Throws
SecurityError — if the ApplicationDomain object is not from the
caller's security domain.
|
Related API Elements
scrollH | property |
scrollV | property |
swfCapability | property |
swfCapability:int
[read-only] Runtime Versions: | AIR 2 |
The type of SWF support on the user's system, defined as an integer code value.
An HTMLLoader object can display SWF content only if this property evaluates to
HTMLSWFCapability.STATUS_OK
. The HTMLSWFCapability class defines constants
for possible values of the swfCapability
property, as follows:
HTMLSWFCapability constant | Meaning |
---|---|
STATUS_OK | A sufficient version of Adobe Flash Player is detected and SWF content can be loaded in an HTMLLoader object. |
ERROR_INSTALLED_PLAYER_NOT_FOUND | No version of Adobe Flash Player is detected. An HTMLLoader object cannot display SWF content. |
ERROR_INSTALLED_PLAYER_TOO_OLD | Adobe Flash Player has been detected, but the version is too old. An HTMLLoader object cannot display SWF content. |
Implementation
public static function get swfCapability():int
Related API Elements
textEncodingFallback | property |
textEncodingFallback:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
The character encoding used by the HTMLLoader content if an HTML page does not specify
a character encoding. An HTML page specifies a character encoding in a meta
tag,
as in the following:
<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1">
Values are defined in the IANA list of valid character sets.
If no encoding is specified by the HTML page, by the textEncodingFallback
property, or by the textEncodingOverride
property, the HTML content uses
ISO-8859-1 encoding.
Implementation
public function get textEncodingFallback():String
public function set textEncodingFallback(value:String):void
More examples
Related API Elements
textEncodingOverride | property |
textEncodingOverride:String
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
The character encoding used by the HTMLLoader content, overriding any setting in the HTML page.
An HTML page specifies a character encoding in a meta
tag, as in the following:
<meta http-equiv="content-type" content="text/html" charset="ISO-8859-1">
This setting also overrides any setting in the textEncodingFallback
property.
Values are defined in the IANA list of valid character sets.
Set the textEncodingOverride
property after the HTML content has loaded
to have AIR refresh the HTML content using the specified encoding. After the HTMLLoader
navigates to a new page, you need to set the property again if you want the new page to
use a specific encoding.
If no encoding is specified by the HTML page, by the textEncodingFallback
property, or by the textEncodingOverride
property, the HTML content uses ISO-8859-1
encoding.
Setting the textEncodingOverride
property to null
restores
the default behavior.
Implementation
public function get textEncodingOverride():String
public function set textEncodingOverride(value:String):void
More examples
Related API Elements
useCache | property |
useCache:Boolean
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 1.0 |
Specifies whether the local cache should be consulted before HTTP requests issued by this object fetch data.
The default value is initialized from URLRequestDefaults.useCache.
Implementation
public function get useCache():Boolean
public function set useCache(value:Boolean):void
Related API Elements
userAgent | property |
userAgent:String
Runtime Versions: | AIR 1.0 |
The user agent string to be used in any upcoming content requests from this HTMLLoader object.
To set the user agent string, set the userAgent
property of the HTMLLoader
object before calling the load()
method. The userAgent
property of the URLRequest object passed to the load()
method is not used.
You can set the default user agent string used by all HTMLLoader objects in an application
domain by setting the URLRequestDefaults.userAgent
property. If no value
is set for the userAgent
property of the HTMLLoader object (or if the value
is set to null
), the user agent string is set to the value of the static
URLRequestDefaults.userAgent
property.
If a value is set for neither the userAgent
property of the HTMLLoader nor for
URLRequestDefaults.userAgent
, a default value is used as the user agent string.
This default value varies depending on the runtime operating system (such as Mac OS, Linux, or Windows),
the runtime language, and the runtime version, as in the following examples:
"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"
Implementation
public function get userAgent():String
public function set userAgent(value:String):void
More examples
Related API Elements
width | property |
width:Number
[override] Runtime Versions: | AIR 1.0 |
Specifies the width of the rectangle of the HTML canvas that is being rendered.
This is the width of the HTMLLoader display object in pixels. The maximum width
value is 4095 pixels.
Changing this property causes the HTMLLoader object to re-render the HTML document.
htmlBoundsChange
events may dispatched in response to changing this property.
When you set the width
and
height
properties of an HTMLLoader object, the bounds of the object change but
content is not scaled (as would happen with other types of display objects).
Implementation
override public function get width():Number
override public function set width(value:Number):void
window | property |
HTMLLoader | () | Constructor |
public function HTMLLoader()
Runtime Versions: | AIR 1.0 |
Creates an HTMLLoader object.
cancelLoad | () | method |
createRootWindow | () | method |
public static function createRootWindow(visible:Boolean = true, windowInitOptions:NativeWindowInitOptions = null, scrollBarsVisible:Boolean = true, bounds:Rectangle = null):flash.html:HTMLLoader
Runtime Versions: | AIR 1.0 |
Creates a new NativeWindow object that contains an HTMLLoader object. Use the HTMLLoader object that is returned by this method to load HTML content.
By default (when you set no parameters in calling this method), the new window uses standard system chrome and includes scrollbar controls for the content. You can set the parameters to change the properties of the new window.
As the window loads content and applies stylesheets, minor graphics glitches can occur. To prevent such
discontinuities from being visible, set the visible
parameter to false
. When the
window has loaded and layed out its content, reveal it by setting the window.nativeWindow.visible
property to
true
or call the window.nativeWindow.activate()
method.
Parameters
visible:Boolean (default = true ) — Specifies whether the window is visible.
| |
windowInitOptions:NativeWindowInitOptions (default = null ) — Specifies window initialization options; if null , uses default
NativeWindowInitOptions values.
| |
scrollBarsVisible:Boolean (default = true ) — Specifies whether the window provides scrollbars.
| |
bounds:Rectangle (default = null ) — If not null , specifies the window bounds. If any of x , y ,
width , or height is NaN , then the corresponding dimension of the window is
left at its default value.
|
flash.html:HTMLLoader — A new HTMLLoader object that is on the stage of the new NativeWindow object.
|
getHistoryAt | () | method |
public function getHistoryAt(position:uint):flash.html:HTMLHistoryItem
Runtime Versions: | AIR 1.0 |
Returns the history entry at the specified position.
Parameters
position:uint — The position in the history list.
|
flash.html:HTMLHistoryItem — A URLRequest object for the history entry at the specified position.
|
Related API Elements
historyBack | () | method |
public function historyBack():void
Runtime Versions: | AIR 1.0 |
Navigates back in the browser history, if possible.
Calling this method of the HTMLLoader object has the same effect
as calling the back()
method of the window.history
property in JavaScript in the HTML page.
This function throws no errors.
Related API Elements
historyForward | () | method |
public function historyForward():void
Runtime Versions: | AIR 1.0 |
Navigates forward in the browser history, if possible.
Calling this method of the HTMLLoader object has the same effect
as calling the forward()
method of the window.history
property in JavaScript in the HTML page.
This function throws no errors.
Related API Elements
historyGo | () | method |
public function historyGo(steps:int):void
Runtime Versions: | AIR 1.0 |
Navigates the specified number of steps in the browser history. Navigates forward if positive, backward if negative. Navigation by zero forces a reload.
This method is equivalent to calling the go()
method of
the window.history
property in JavaScript in the HTML page.
This function throws no errors.
Parameters
steps:int — The number of steps in the history list to move
forward (positive) or backward (negative).
|
Related API Elements
load | () | method |
public function load(urlRequestToLoad:URLRequest):void
Runtime Versions: | AIR 1.0 |
Loads the HTMLLoader object with data from the site specified by the urlRequestToLoad
parameter.
Calling this method initially sets the loaded
property to false
. This method
initiates an operation that always completes asynchronously.
A call to this method implicitly cancels any pending previous load operation initiated with
this method or with the loadString()
method. The complete
event for the previous
load operation will never be delivered.
It is possible that the complete
event will never be delivered. This happens if any of
the HTML content loaded into the HTMLLoader object never downloads completely. This can happen if
the HTML content references a URL to a CGI script that repetedly generates content indefinitely.
Parameters
urlRequestToLoad:URLRequest — The URLRequest object containing information about the URL to
load. In addition to the URL to load, a URLRequest object contains properties that define
the HTTP form submission method (GET or POST), any data to be transmitted with the request,
and request headers.
|
More examples
Related API Elements
loadString | () | method |
public function loadString(htmlContent:String):void
Runtime Versions: | AIR 1.0 |
Loads the HTMLLoader object with the HTML content contained in the HTML string. When rendering of the
of the HTML in the string is complete, the complete
event is dispatched. The
complete
event is always dispatched asynchronously.
A call to this method implicitly cancels any pending previous load operation initiated with
this method or with the load()
method. The complete
event for the previous
load operation will never be delivered.
If the HTML specified in the string has no references to external resources, then this method
synchronously renders the HTML. However, the complete
event is still dispatched
asynchronously. If the loaded
property of this class is true
immediately
following a call to this function, the HTML content specified in the htmlContent
argument
was rendered synchronously.
It is possible that the complete
event will never be delivered. This happens if any of
the HTML content loaded into the HTMLLoader object never downloads completely. This can happen if
the HTML content references a URL to a CGI script that repetedly generates content indefinitely.
Content loaded via the loadString()
method is put in the application security sandbox
only if the placeLoadStringContentInApplicationSandbox
property is set to true
.
Parameters
htmlContent:String — The string containing the HTML content to load into the HTMLLoader object.
|
More examples
Related API Elements
reload | () | method |
complete | Event |
flash.events.Event
property Event.type =
flash.events.Event.COMPLETE
Runtime Versions: | AIR 1.0 |
Signals that the last load operation requested by loadString
or
load
method has completed.
The event is dispatched after the JavaScript load
event has fired
on the HTML DOM in the HTMLLoader object.
This event is always dispatched asynchronously. The event handler for this event can call any
method or access any property of the HTMLLoader object.
Event.COMPLETE
constant defines the value of the type
property of a complete
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The network object that has completed loading. |
More examples
Related API Elements
htmlBoundsChange | Event |
flash.events.Event
property Event.type =
flash.events.Event.HTML_BOUNDS_CHANGE
Runtime Versions: | AIR 1.0 |
Signals that one or both of the contentWidth
and contentHeight
properties of the HTMLLoader object has changed. This may be result from a new image or other content loading,
for example. Event handlers may call any method or access any property
of the HTMLLoader object.
The HTMLLoader object can dispatch this event any time after a load operation is initiated,
even after the object has dispatched the complete
event.
Event.HTML_BOUNDS_CHANGE
constant defines the value of the type
property of an htmlBoundsChange
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The HTMLLoader object. |
target | The HTMLLoader object. |
More examples
Related API Elements
htmlDOMInitialize | Event |
flash.events.Event
property Event.type =
flash.events.Event.HTML_DOM_INITIALIZE
Runtime Versions: | AIR 1.0 |
Signals that the HTML DOM has been created in response to a load operation. The load()
and loadString()
methods of the HTMLLoader object throw an exception while
this event is being dispatched. Any property or method of any JavaScript object accessible from the
window
property of the HTMLLoader object that controls the URL that is loaded in
the HTMLLoader object throws an exception if set or called while this event is dispatched.
For example, setting window.location
by setting the window
property of
the HTMLLoader object results in a JavaScript exception.
Event.HTML_DOM_INITIALIZE
constant defines the value of the type
property
of an htmlDOMInitialize
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The HTMLLoader object. |
target | The HTMLLoader object. |
More examples
Related API Elements
htmlRender | Event |
flash.events.Event
property Event.type =
flash.events.Event.HTML_RENDER
Runtime Versions: | AIR 1.0 |
Signals that the rendering of content in the HTMLLoader object is fully up to date. This event can be dispatched quite frequently—whenever any rendering change is made to the HTML content. For example, this event is dispatched when new content is displayed as a result of a user clicking a link or when JavaScript in the page renders HTML. Event listeners can call any method or access any property of the HTMLLoader object.
Handlers of this event should check the contentWidth
and contentHeight
properties of the HTMLLoader object to update any scroll bars associated with it.
The HTMLLoader object can dispatch this event any time after a load operation is initiated,
even after the object has dispatched the complete
event.
Event.HTML_RENDER
constant defines the value of the type
property of an htmlRender
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The HTMLLoader object. |
target | The HTMLLoader object. |
locationChange | Event |
flash.events.LocationChangeEvent
property LocationChangeEvent.type =
flash.events.LocationChangeEvent.LOCATION_CHANGE
Runtime Versions: | AIR 2.7 |
Signals that the location
property of the HTMLLoader object has changed.
The event handler for this event can call any method or access any property of the
HTMLLoader object.
A locationChange
event of type LocationChangeEvent is dispatched by the
HTMLLoader in applications using AIR namespace 2.7 and later. In earlier versions of AIR,
the dispatched event object is of type, Event.
More examples
Related API Elements
locationChange | Event |
flash.events.Event
property Event.type =
flash.events.Event.LOCATION_CHANGE
Runtime Versions: | AIR 1.0 |
Signals that the location
property of the HTMLLoader object has changed.
The event handler for this event can call any method or access any property of the
HTMLLoader object.
A locationChange
event of type Event is dispatched by the HTMLLoader
in applications using an AIR namespace prior to 2.7. In AIR 2.7 and later, the event object is
of type, LocationChangeEvent, which provides an additional location
property set
to the new page URL.
Event.LOCATION_CHANGE
constant defines the value of the type
property of a locationChange
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The HTMLLoader object. |
target | The HTMLLoader object. |
More examples
Related API Elements
locationChanging | Event |
flash.events.LocationChangeEvent
property LocationChangeEvent.type =
flash.events.LocationChangeEvent.LOCATION_CHANGING
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2.7 |
Signals that the location
property of the HTMLLoader object is about to change.
A locationChanging event is only dispatched when the location change is initiated through
HTML content or code running inside the HTMLLoader object,such as when a user clicks a link.
By default, the new location is displayed in this
HTMLLoader object. You can call the preventDefault()
method of the event
object to cancel the default behavior. For example, you could use the flash.net.navigateToURL()
function to open the page in the system browser based on the location
property of the event object
A locationChanging()
is not dispatched when you call the following methods:
- load()
- loadString()
- reload()
- historyBack()
- historyForward()
- historyGo()
In addition, this event is not dispatched when the destination page is opened in the system browser, since the HTMLLoader location does not change.
Dispatched before a location change that is initiated via the content displayed in an HTMLLoader or StageWebView object.Call the preventDefault()
method of the event object to prevent the change.
A locationChanging event is not dispatched when you change the location with the following methods:
historyBack()
historyForward()
historyGo()
load()
loadString()
loadURL()
reload()
HTMLLoader objects dispatch locationChanging
events in AIR 2.7 and later.
scroll | Event |
flash.events.Event
property Event.type =
flash.events.Event.SCROLL
Runtime Versions: | AIR 1.0 |
Signals that the scrollH
or scrollV
property has been changed
by the HTMLLoader object. The HTMLLoader object dispatches this event when JavaScript running in the
HTMLLoader object invokes the scrollTo()
method of the window
object
and the desired location is not already visible. The event is not dispatched when ActionScript
code changes the scrollH
or scrollV
property.
Event handlers may call any method or access any property
of the HTMLLoader object.
Event handlers for this event should check the scrollH
and scrollV
properties to update any scroll bars associated with the HTMLLoader object.
The HTMLLoader object can dispatch this event any time after a load operation is initiated,
even after the object has dispatched the complete
event.
Event.SCROLL
constant defines the value of the type
property of a scroll
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
currentTarget | The object that is actively processing the Event object with an event listener. |
target | The TextField object that has been scrolled.
The target property is not always the object in the display list
that registered the event listener. Use the currentTarget
property to access the object in the display list that is currently processing the event. |
More examples
uncaughtScriptException | Event |
flash.events.HTMLUncaughtScriptExceptionEvent
property HTMLUncaughtScriptExceptionEvent.type =
flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION
Runtime Versions: | AIR 1.0 |
Signals that an uncaught JavaScript exception occurred in the HTMLLoader object. Event handlers can call any method or access any property of the HTMLLoader object. The event is cancelable, and the default behavior when running in the AIR Debug Launcher is to send the JavaScript stack to the trace output.
TheHTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION
constant
defines the value of the type
property of an
uncaughtScriptException
event object.
This event has the following properties:
Property | Value |
---|---|
bubbles | false |
cancelable | false ; there is no default behavior to cancel. |
exceptionValue | The result of evaluating the expression in the throw
statement that resulted in the uncaught exception. |
stackTrace | An array of objects that represent the stack trace
at the time the throw statement that resulted in the uncaught exception was executed. |
target | The HTMLLoader object. |
More examples
Related API Elements
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); } } }
Mon Nov 28 2011, 06:48 AM -08:00