Name
view (LzView) — The most basic viewable element.
Description
The view is the most basic viewable element in an
OpenLaszlo application. Anything that is displayed on the canvas is a view
or extends the view class. A view is a rectangle, which can be visible or invisible, and which can contain other views or
display "resources" such as images,
.swf files, or other supported media. One view controls one
displayable resource. The view system is strictly hierarchical; that is, each view has
a single parent but can have multiple children.
The following code shows one view nested inside another:
LzView extends LzNode,
which is the fundamental abstract class of LZX.
For more a gentle introduction to views please see the Laszlo tutorials, particularly Laszlo Basics and Understanding Views. For a more
rigorous explanation of views see theDeveloper's Guide, particularly the views chapter.
Known Subclasses
Known Direct Subclasses: autocompletecombobox, basecomponent, basedatepickerday, basedatepickerweek, basedragimage, baseform, baseslidertrack, basetooltip, basetrackgroup, basevalidator, basezoomarea, borderinput, colorpot, colorrow, datacolumn, dataseries, DebugObject, fileupload, fileuploadlist, fisheye, fisheye_item, hbox, hsplitpane, image, linkdialog, menuarrow, multiplefileupload, opttree, replicator, richtexteditor, richtexttoolbar, rtmpstatus, shadowbox, simpleinputtext, ulink, valuepoints, vbox, videolibraryicon, videolibrarypopup, videoplayer, videoscreen, videoslider, videothumbnail, videotogglebutton, videoview, videovolumebutton, canvas (LzCanvas), text (LzText)
Details
Static Methods (2)
-
addProxyPolicy()
-
<method name="addProxyPolicy" args="f" />
static public function addProxyPolicy(f : Function);
Adds a function which can decide how the media at a given URL should be
loaded
-
removeProxyPolicy()
-
<method name="removeProxyPolicy" args="f" />
static public function removeProxyPolicy(f : Function) : Boolean;
Removes a proxy policy function that has been added using
LzView.addProxyPolicy
Initial Attributes (3)
Initial Attributes are given as attributes in LZX but are not generally available as properties in JavaScript.
-
clip
-
<attribute name="clip" type="boolean" />
A boolean indicating that the view is masked
if true, the view applies setClip(true) to itself
-
resource
-
<attribute name="resource" type="string" />
A string denoting the library resource to use for
this view. The default is usually 'theEmptyResource'
In addition to any events documented in the section below, these events are also available:
onmouseupoutside: Sent when the mouse button comes up outside a
view This event is only sent by views which are clickable
after it went down over the view. This event is only sent by views which
are clickable
onmousedragin: Sent when the mouse button went down over the view
and the button is still down when mouse rolls back inside the view.
This event is only sent by views which are clickable
onmousedragout: Sent when the mouse button went down over the view
and the button is still down when mouse rolls outside the view.
This event is only sent by views which are clickable
-
stretches
-
<attribute name="stretches" type="boolean" />
A string specifying whether or not the view
should stretch its contents. Values are
width,
height or
both.
When stretching, the coordinate system of the contents is modified
so that the whole view will fit in the given dimensions.
If
stretches is applied,
clip would not be necessary.
Properties (41)
-
addedToParent
-
<attribute name="addedToParent" />
public var addedToParent = null;
-
bgcolor
-
<attribute name="bgcolor" type="color" />
public var bgcolor : color = null;
The color of background of this view. Null if there is
no bgcolor. A number from 0 - 0xFFFFFF.
-
blurring
-
<attribute name="blurring" type="boolean" />
public var blurring : Boolean = false;
blurring is true if the view is in the process of losing focus.
-
capabilities
-
<attribute name="capabilities" />
-
checkPlayStatusDel
-
<attribute name="checkPlayStatusDel" />
public var checkPlayStatusDel = null;
-
clickable
-
<attribute name="clickable" />
public var clickable = false;
-
DOUBLE_CLICK_TIME
-
<attribute name="DOUBLE_CLICK_TIME" />
public var DOUBLE_CLICK_TIME = 500;
-
focusable
-
<attribute name="focusable" type="boolean" />
public var focusable : Boolean = false;
If true, this view will receive focus events.
See focus manager (LzFocus) for more details.
-
focustrap
-
<attribute name="focustrap" type="boolean" />
public var focustrap : boolean;
If true, this view "traps" the focus, for example in a window or dialog.
See focus manager (LzFocus) for more details.
-
fontsize
-
<attribute name="fontsize" type="size" />
public var fontsize : size;
Pixel size to use to render text which appears inside this
view. The default is 8.
-
fontstyle
-
<attribute name="fontstyle" type="string" />
public var fontstyle : String;
The style to use to render text fields that appear inside of
this view. One of "plain", "bold" , "italic" or "bolditalic".
-
frame
-
<attribute name="frame" type="numberExpression" value=""0"" />
public var frame : NumberExpression = 0.0;
If this view has a multi-frame resource, this allows setting which
resource frame is displayed. Defaults to the first frame (1).
-
framesloadratio
-
<attribute name="framesloadratio" type="number" />
public var framesloadratio : Number = 0.0;
For views whose resource is loaded at runtime,
the ratio of the loaded frames to the total frames. This is a number between
zero and 1.
-
hassetheight
-
<attribute name="hassetheight" type="boolean" />
public var hassetheight : Boolean = false;
If true, then setWidth() has been called on this
view, and the view will not be sized to its contents.
-
hassetwidth
-
<attribute name="hassetwidth" type="boolean" />
public var hassetwidth : Boolean = false;
If true, then setHeight() has been called on this
view, and the view will not be sized to its contents.
-
height
-
<attribute name="height" type="sizeExpression" />
public var height : Number = 0.0;
-
layouts
-
<attribute name="layouts" type="css" />
public var layouts : Object = null;
A CSS sequence of layout parameters in 'property: value' form.
These values are used to create a layout that is attached to this view.
If there
is a class property, it names the class of the layout; otherwise
simplelayout is used. If the value of this attribute is a single
id, it is used as the axis attribute of a simplelayout.
Examples:
axis: x,
class: constantlayout;
axis: y;
axis: x; spacing: 5.
-
loadperc
-
<attribute name="loadperc" />
public deprecated var loadperc = 0.0;
-
loadratio
-
<attribute name="loadratio" type="number" />
public var loadratio : Number = 0.0;
For views whose resource is loaded at runtime,
ratio of the loaded bytes to the total bytes. This is a number between
zero and 1.
-
mask
-
<attribute name="mask" type="view" />
public var mask : LzView;
Reference to closest masked view in the hierarchy at or above
this one
-
masked
-
<attribute name="masked" />
public var masked = false;
-
opacity
-
<attribute name="opacity" type="opacity" value=""1.0"" />
public var opacity : Opacity = 1;
The opacity of the view's contents. @c{1.0} is opaque; @c{0.0} is
totally transparent (invisible).
-
pixellock
-
<attribute name="pixellock" type="booleanLiteral" />
public var pixellock : BooleanLiteral = null;
The view system supports sub-pixel positioning to enable smooth
animation. This may be turned off to make the view snap to a
pixel boundary by setting pixellock to true.
-
resource
-
<attribute name="resource" type="string" />
public var resource : String = null;
A resource that is presented in the background of this view. The
value can be either the name of a resource defined with the
resource tag, a URL, or a pathname. If the value is a URL,
the resource is requested when the view is displayed. If it's a
pathname, the file named by the pathname is compiled into the
application, and attached to this view.
-
resourceheight
-
<attribute name="resourceheight" />
public var resourceheight = null;
-
resourcewidth
-
<attribute name="resourcewidth" />
public var resourcewidth = null;
-
rotation
-
<attribute name="rotation" type="numberExpression" value=""0"" />
public var rotation : Number = 0.0;
The rotation value for the view (in degrees).
Value may be less than zero or greater than 360.
-
setButtonSize
-
<attribute name="setButtonSize" />
public var setButtonSize = null;
-
showhandcursor
-
<attribute name="showhandcursor" type="boolean" />
public var showhandcursor : boolean = null;
Show or hide the hand cursor for this view, if clickable
-
sprite
-
<attribute name="sprite" />
public var sprite = null;
-
subviews
-
<attribute name="subviews" />
An array of the subviews that are children of this
view. This is initialized to an empty array for views that have no subviews.
-
totalframes
-
<attribute name="totalframes" type="number" />
public var totalframes : Number = 0.0;
The total number of frames for this view's resource.
-
unstretchedheight
-
<attribute name="unstretchedheight" type="number" />
public var unstretchedheight : Number = 0.0;
If stretches is not set to none, the height
that this view would be if it weren't stretched. This attribute can be used
to scale a view by a percentage of its original size, or to determine the
aspect ratio for a view.
-
unstretchedwidth
-
<attribute name="unstretchedwidth" type="number" />
public var unstretchedwidth : Number = 0.0;
If stretches is not set to none, the width
that this view would be if it weren't stretched. This attribute can be used
to scale a view by a percentage of its original size, or to determine the
aspect ratio for a view.
-
updatePlayDel
-
<attribute name="updatePlayDel" />
public var updatePlayDel = null;
-
visible
-
<attribute name="visible" type="boolean" value=""true"" />
public var visible : Boolean = true;
A value of true means that this view is shown. A
value of false means that this view is hidden.
Note that an otherwise clickable view that is not visible will have no click
region and will not be clickable.
-
width
-
<attribute name="width" type="sizeExpression" />
public var width : Number = 0.0;
-
x
-
<attribute name="x" type="numberExpression" value=""0"" />
public var x : Number = 0.0;
The horizontal offset of this view's upper left corner from the
upper left corner of its container.
-
xoffset
-
<attribute name="xoffset" type="numberExpression" value=""0"" />
public var xoffset : NumberExpression = 0.0;
Specifies a translation point for drawing of this view. If the xoffset
is set, then rotation and x position will be calculated by first adding
the xoffset.
-
y
-
<attribute name="y" type="numberExpression" value=""0"" />
public var y : Number = 0.0;
The vertical offset of this view's upper left corner from the
upper left corner of its container
-
yoffset
-
<attribute name="yoffset" type="numberExpression" value=""0"" />
public var yoffset : NumberExpression = 0.0;
Specifies a translation point for drawing of this view. If the yoffset
is set, then rotation and y position will be calculated by first adding
the yoffset.
Setters (28)
Setters for virtual properties, to be used with setAttribute. A setter may or may not have a corresponding getter method;
consult the Methods list in this section.
-
aaactive
-
Activate/inactivate children for accessibility
-
aadescription
-
Set accessibility description
-
aaname
-
-
aasilent
-
Set accessibility silencing/unsilencing
-
aatabindex
-
Set accessibility tab order
-
align
-
bgcolor
-
The background color of the canvas.
-
clickable
-
If true, this view intercepts click events; otherwise they are passed
to its container. This defaults to true if the view defines a mouse
event handler or a cursor.
-
clip
-
Clip the view's contents to its size.
-
cursor
-
The cursor to display when the mouse is over this view. Any
resource can be used as a cursor. This attribute can be set for
any view with clickable=true, or any view whose class defaults
clickable to true.
-
fgcolor
-
A color to use to render object that appears inside this view,
which includes any vector or bitmap art in the view's resource
and any contained views.
-
font
-
The font to use for any @c{<text>} or @c{<inputtext>} elements that
appear inside this view. Like all the font properties
(
fontstyle and
fontsize too) these
properties cascade down the view hierarchy until a new value is
specified. When the font attributes are modified at runtime,
using JavaScript, the font is changed for the view itself, not
for any of its subviews.
-
frame
-
height
-
layout
-
opacity
-
play
-
If true, the resource attached to this view begins playing when
the view is instantiated.
-
resource
-
Sets the name of this views resource, or the URL from which it should
be loaded.
-
rotation
-
showhandcursor
-
Show or hide the handcursor for this view, if clickable
-
stretches
-
Setting
stretches causes a view to change its
coordinate space so that everything it contains (resources and
other views) fit exactly into the view's width and/or height. The
default for this property is "none". This is used to resize a
view's contents by setting its width and/or height.
-
valign
-
Creates a constraint on the view's y position which is a function
of its height and its parent's height. The default for this is
"top".
-
visible
-
width
-
x
-
xoffset
-
A value to be added to the
x position of this view before drawing
it. This affects the apparent rotation point of the view, as well as
its apparent
x position. It does not affect the view's width or its
internal coordinate system.
-
y
-
yoffset
-
A value to be added to the
y position of this view
before drawing it. This affects the apparent rotation point of the view, as
well as its apparent
y position. It does not affect the view's width or its
internal coordinate system.
Methods (68)
-
addSubview()
-
<method name="addSubview" args="s" />
protected function addSubview(s : LzView);
Called when a subview is added to the view.
-
bringToFront()
-
<method name="bringToFront" />
public function bringToFront();
This method makes this view the frontmost subview of this view's parent.
-
construct()
-
<method name="construct" args="parent, args" />
protected function construct(parent, args);
Base level constructor for views. See
construct for more on this.
-
containsPt()
-
<method name="containsPt" args="x, y" />
public function containsPt(x : Number, y : Number) : Boolean;
returns true if the point is contained within the view.
-
getAttributeRelative()
-
<method name="getAttributeRelative" args="prop, refView" />
public function getAttributeRelative(prop : String, refView : LzView);
Transform the specified attribute (width/height/x/y) from the existing
coordinate space to the reference view's coordinate space. This
transformation takes into account any nested views between the views and
the common ancestor view.
This method answers the question: what should this view set its
width/height/x/y to in order to appear to have the same value for that
attribute as the reference view?
-
getBounds()
-
<method name="getBounds" />
public function getBounds() : Object;
Returns an Object with x, y, width, and height properties that are the
coordinates of the view's bounding box in its immediateparent's coordinate
system. The Laszlo view object uses a relatively simple notion for its
coordinate system. Note that this function doesn't necessarily return the
true bounding box of the view, but a box surrounding the view, since this
method respects a set width and/or height and ignores subviews that appear
left or above of the view's 0,0 point.
The xoffset and yoffset properties of the bounds object are the distance
between the view's x or y property and the top or left of the bounding
box.
-
getColor()
-
<method name="getColor" />
public function getColor();
Gets the color of the view (the view's resource and any subviews) view as
as set with setColor().
Returns A color in rgb format; for example, 0xff0000 is red.
-
getColorTransform() (as2)
-
<method name="getColorTransform" />
public function getColorTransform();
Returns an object that represents the color transformation currently applied
to the view. The color transform object has the following possible keys
o.ra: percentage alpha for red component (-100 to 100);
o.rb: offset for red component (-255 to 255);
o.ga: percentage alpha for green component (-100 to 100);
o.gb: offset for green component (-255 to 255);
o.ba: percentage alpha for blue component (-100 to 100);
o.bb: offset for blue component (-255 to 255);
o.aa: percentage overall alpha (-100 to 100);
o.ab: overall offset (-255 to 255);
-
getContextMenu()
-
<method name="getContextMenu" />
public function getContextMenu();
LzView.getContextMenu
Returns the current context menu object
-
getCurrentTime()
-
<method name="getCurrentTime" />
public function getCurrentTime() : Number;
Return the elapsed play time within the view's resource.
-
getDepthList()
-
<method name="getDepthList" />
public function getDepthList();
-
getHeight()
-
<method name="getHeight" />
protected function getHeight();
Returns the height of the view.
-
getID3()
-
public function getID3() : Object;
Returns an object containing the media's id3 tag, assuming it's mp3 loaded
with proxy == false;
-
getMouse()
-
<method name="getMouse" args="xory" />
public function getMouse(xory) : Number;
This method returns the position of the mouse relative to this view.
-
getPan()
-
public function getPan() : Integer;
Get the pan of the attached resource
-
getTotalTime()
-
<method name="getTotalTime" />
public function getTotalTime() : Number;
Returns the total amount of time the resource would take to play.
-
getVolume()
-
<method name="getVolume" />
public function getVolume() : Integer;
Get the volume of the attached resource
-
getWidth()
-
<method name="getWidth" />
protected function getWidth();
Returns the width of the view.
-
getZ()
-
public function getZ() : Integer;
Get the Z order of the view
-
init()
-
protected function init();
Called right before the view is shown. See
init for more.
-
measureHeight()
-
<method name="measureHeight" />
public function measureHeight();
reports the height of the contents of the view
(not supported in a constraint expression)
-
measureWidth()
-
<method name="measureWidth" />
public function measureWidth();
reports the width of the contents of the view
(not supported in a constraint expression)
-
play()
-
<method name="play" args="f, rel" />
public function play(f : Integer, rel : Boolean);
Start playing the attached resource. Note that a compiled resource that
begins playing when it is attached (i.e. does not contain a 'stop'
instruction in the first frame) will not send events and generally behave
correctly unless it is told to play. Resources which are loaded via
setSource don't have this issue.
-
releaseLayouts()
-
<method name="releaseLayouts" />
public function releaseLayouts();
Releases all the layouts applied to this view.
@deprecated
-
searchSubviews()
-
<method name="searchSubviews" args="prop, val" />
public function searchSubviews(prop : String, val) : LzView;
Search all subviews for a named property. For now, returns when it finds the
first one. This is a width first search.
-
seek()
-
<method name="seek" args="secs" />
public function seek(secs : Integer);
Skips forward or backward n seconds (depending on the sign of the argument).
If playing, continue to play. If stopped, stay
stopped
-
sendBehind()
-
<method name="sendBehind" args="v" />
public function sendBehind(v : LzView) : Boolean;
Puts this view behind one of its siblings.
-
sendInFrontOf()
-
<method name="sendInFrontOf" args="v" />
public function sendInFrontOf(v : LzView) : Boolean;
Puts this view in front of one of its siblings.
-
sendToBack()
-
<method name="sendToBack" />
public function sendToBack();
This method makes this view the hindmost subview of this view's parent.
-
setAAActive()
-
<method name="setAAActive" args="s, mc" />
public function setAAActive(s : Boolean, mc);
Activate/inactivate children for accessibility
-
setAADescription()
-
<method name="setAADescription" args="s, mc" />
public function setAADescription(s : string, mc);
Set accessibility description
-
setAAName()
-
<method name="setAAName" args="s, mc" />
public function setAAName(s : string, mc);
-
setAASilent()
-
<method name="setAASilent" args="s, mc" />
public function setAASilent(s : string, mc);
Set accessibility silencing/unsilencing
-
setAATabIndex()
-
<method name="setAATabIndex" args="s, mc" />
public function setAATabIndex(s : number, mc);
Set accessibility tab order
-
setAccessible()
-
<method name="setAccessible" args="accessible" />
public function setAccessible(accessible : Boolean);
-
setAlign()
-
<method name="setAlign" args="align" />
public function setAlign(align);
Sets the
alignment for the view to the given
value. The alignment is based on the size of this view as compared
to the size of the view's immediate parenbgRef.
-
setAttributeRelative()
-
<method name="setAttributeRelative" args="prop, refView" />
public function setAttributeRelative(prop : String, refView : LzView);
This method is used to set a view's property to match that of
another view -- potentially one in another coordinate system.
-
setBGColor()
-
<method name="setBGColor" args="bgc" />
public function setBGColor(bgc : Integer);
Gives the view a bgcolor that is the same size as the view.
-
setClickable()
-
<method name="setClickable" args="amclickable" />
public function setClickable(amclickable);
Makes a view clickable or not clickable.
-
setColor()
-
<method name="setColor" args="c" />
public function setColor(c : Integer);
Sets the color of the view (the view's resource and any subviews) to the
the color given. This will completely override any color information in the
view or subview resources. Use the view method
setColorTransform to tint a view.
-
setColorTransform() (as2)
-
<method name="setColorTransform" args="o" />
public function setColorTransform(o);
color transforms everything contained in the view (except the
background) by the transformation dictionary given in
o. The dictionary has
the following possible keys:
o.ra: percentage alpha for red component (-100 to 100);
o.rb: offset for red component (-255 to 255);
o.ga: percentage alpha for green component (-100 to 100);
o.gb: offset for green component (-255 to 255);
o.ba: percentage alpha for blue component (-100 to 100);
o.bb: offset for blue component (-255 to 255);
o.aa: percentage overall alpha (-100 to 100);
o.ab: overall offset (-255 to 255);
-
setContextMenu()
-
<method name="setContextMenu" args="cmenu" />
public function setContextMenu(cmenu : LzContextMenu);
LzView.setContextMenu
Install menu items for the right-mouse-button
-
setCursor()
-
<method name="setCursor" args="cursor" />
public function setCursor(cursor : String);
Sets the cursor to the given resource when the mouse is over this view
-
setHeight()
-
<method name="setHeight" args="v" />
public function setHeight(v : Number);
Sets the height of the view the given value. If the view is set to stretch
its resource, the resource will be resized to the new value. If the value
'null' is given for the new height, then the height is unset, and the height
of the view will be the size measured of its contents.
-
setLayout()
-
<method name="setLayout" args="layoutobj" />
public function setLayout(layoutobj : Object);
this creates a specific child layout for this view. When called a second time
the first layout will be replaced by the second.
-
setOpacity()
-
<method name="setOpacity" args="v" />
public function setOpacity(v : Number);
Sets the opacity for the view. The opacity is a number between 0.0
(transparent) and 1.0 (opaque).
-
setPan()
-
<method name="setPan" args="p" />
public function setPan(p : Integer);
Set the pan of the attached resource
-
setPlay()
-
<method name="setPlay" args="b" />
public function setPlay(b : Boolean);
Start or stop playing the attached resource.
-
setResource()
-
<method name="setResource" args="resourceName" />
public function setResource(resourceName : String);
This method associates a view with a named library element. If the
view's
isVisible property is true, the
resource will be displayed when it is attached
-
setResourceNumber()
-
<method name="setResourceNumber" args="n" />
public function setResourceNumber(n : Integer);
For resources which have more than one frame, this function sets
the view
to display the numbered resource. For Flash assets, resource numbers
correspond to
movieclip frames.
-
setRotation()
-
<method name="setRotation" args="v" />
public function setRotation(v : Number);
Sets the
rotation for the view to the given value.
-
setShowHandCursor()
-
<method name="setShowHandCursor" args="s" />
public function setShowHandCursor(s : Boolean);
Shows or hides the hand cursor for this view.
-
setSource()
-
<method name="setSource" args="source, cache, headers" />
public function setSource(source : String, cache : String, headers : String);
This function allows the view to load its media from an URL at runtime.
Resources loaded with
setSource will replace compiled
resources when the request is made.
-
setValign()
-
<method name="setValign" args="valign" />
public function setValign(valign);
Sets the vertical alignment for the view to the given value. The alignment
is based on the height of this view as compared to the height of the view's
immediateparent.
-
setVisible()
-
<method name="setVisible" args="amVisible" />
public function setVisible(amVisible);
This method sets the
visible attribute of the view
and also disables or re-enables any click region associated with the view.
-
setVolume()
-
<method name="setVolume" args="v" />
public function setVolume(v : Integer);
Set the volume of the attached resource
-
setWidth()
-
<method name="setWidth" args="v" />
public function setWidth(v : Number);
Sets the width of the view. If the view is set to stretch its resource, the
resource will be resized to the new value. If the value 'null' is given for
the new width, then the width is unset, and the width of the view will be
the size of its contents.
-
setX()
-
<method name="setX" args="v, force" />
public function setX(v : Number, force);
Sets the
x position of the view to the given value.
-
setXOffset()
-
<method name="setXOffset" args="o" />
public function setXOffset(o : Integer);
-
setY()
-
<method name="setY" args="v, force" />
public function setY(v : Number, force);
Sets the
y position for the view to the given value.
-
setYOffset()
-
<method name="setYOffset" args="o" />
public function setYOffset(o : Integer);
-
shouldYieldFocus()
-
<method name="shouldYieldFocus" />
public function shouldYieldFocus();
Determine whether a view should give up focus. Override this method to
specify your own policy.
-
spriteAttribute()
-
<method name="spriteAttribute" args="attrname, value" />
public function spriteAttribute(attrname, value);
Receive attribute/event change from sprite
-
stop()
-
<method name="stop" args="f, rel" />
public function stop(f : Integer, rel : Boolean);
Stop playing the attached resource
-
stretchResource()
-
<method name="stretchResource" args="xory" />
public function stretchResource(xory : String);
Sets the view so that it stretches its resource in the given axis so that
the resource is the same size as the view. The has the effect of distorting
the coordinate system for all children of this view, so use this method
with care.
-
unload()
-
public function unload();
Unloads media loaded with setSource or the source= attribute.
-
updateResourceSize()
-
<method name="updateResourceSize" />
public function updateResourceSize();
Since a view does not re-measure the size of its resource once that resource
has loaded, this method is provided to force the view to update its size,
taking into account the current size of its resource.
-
__warnCapability()
-
<method name="__warnCapability" args="msg" />
public function __warnCapability(msg);
Events (41)
-
onaddsubresource
-
<attribute name="onaddsubresource" />
public event onaddsubresource;
-
onaddsubview
-
<attribute name="onaddsubview" />
public event onaddsubview;
Event called when this view adds a subview
-
onbgcolor
-
<attribute name="onbgcolor" />
-
onblur
-
<attribute name="onblur" />
The onblur script is executed when an element loses focus either
by the pointing device or by tabbing navigation.
-
onclick
-
<attribute name="onclick" />
The onclick script is executed when the pointing device button is
clicked over an element.
-
onclickable
-
<attribute name="onclickable" />
public event onclickable;
-
ondblclick
-
<attribute name="ondblclick" />
The ondblclick script is executed when the pointing device button
is double clicked over an element.
-
onerror
-
<attribute name="onerror" />
onerror: Sent when there is an error loading the view's resource.
The argument sent with the event is the error string sent by the server.
-
onfocus
-
<attribute name="onfocus" />
The onfocus script is executed when an element receives focus
either by the pointing device or by tabbing navigation.
-
onframe
-
<attribute name="onframe" />
-
onheight
-
<attribute name="onheight" />
Event for changes to view's
height property
-
onimload
-
<attribute name="onimload" />
-
onkeydown
-
<attribute name="onkeydown" />
The onkeydown script is executed when this view has the focus and
a key is pressed down. Multiple key down events are sent for a
key that is held down. If you want the script executed only
once, use onkeyup. This event is sent with the keycode for the key that is
down.
-
onkeyup
-
<attribute name="onkeyup" />
The onkeyup script is executed when this view has the focus and a
key is released. This event is sent with the keycode for the key that
went up.
-
onlastframe
-
<attribute name="onlastframe" />
public event onlastframe;
-
onload
-
<attribute name="onload" />
-
onloadperc
-
<attribute name="onloadperc" />
-
onmousedown
-
<attribute name="onmousedown" />
public event onmousedown;
The onmousedown script is executed when the pointing device button is
pressed over an element.
-
onmouseout
-
<attribute name="onmouseout" />
The onmouseout script is executed when the point device is moved
so that is is no longer over an element.
-
onmouseover
-
<attribute name="onmouseover" />
public event onmouseover;
The onmouseover script is executed when the pointing device is
moved onto an element.
-
onmousetrackover
-
<attribute name="onmousetrackover" />
public event onmousetrackover;
-
onmousetrackup
-
<attribute name="onmousetrackup" />
public event onmousetrackup;
-
onmouseup
-
<attribute name="onmouseup" />
The onmouseup script is executed when the pointing device button is
released over an element.
-
onopacity
-
<attribute name="onopacity" />
Sent when a view changes its opacity
-
onplay
-
<attribute name="onplay" />
-
onremovesubview
-
<attribute name="onremovesubview" />
public event onremovesubview;
Event called when this view removes a subview
-
onresource
-
<attribute name="onresource" />
-
onresourceheight
-
<attribute name="onresourceheight" />
public event onresourceheight;
-
onresourcewidth
-
<attribute name="onresourcewidth" />
public event onresourcewidth;
-
onrotation
-
<attribute name="onrotation" />
-
onstop
-
<attribute name="onstop" />
-
ontimeout
-
<attribute name="ontimeout" />
ontimeout: Sent when the request to load media for the view times
out
-
ontotalframes
-
<attribute name="ontotalframes" />
public event ontotalframes;
-
onunstretchedheight
-
<attribute name="onunstretchedheight" />
public event onunstretchedheight;
-
onunstretchedwidth
-
<attribute name="onunstretchedwidth" />
public event onunstretchedwidth;
-
onvisible
-
<attribute name="onvisible" />
-
onwidth
-
<attribute name="onwidth" />
event for changes to view's
width property
-
onx
-
event for changes to view's
x property
-
onxoffset
-
<attribute name="onxoffset" />
-
ony
-
event for changes to view's
y property
-
onyoffset
-
<attribute name="onyoffset" />
LZX Synopsis
<class name="
LzView" extends="
LzNode
">
<attribute name="
bgcolor
" type="
color" />
<attribute name="
blurring
" type="
boolean" />
<attribute name="
focusable
" type="
boolean" />
<attribute name="
focustrap
" type="
boolean" />
<attribute name="
fontsize
" type="
size" />
<attribute name="
fontstyle
" type="
string" />
<attribute name="
frame
" type="
numberExpression" value="
"0"" />
<attribute name="
height
" type="
sizeExpression" />
<attribute name="
layouts
" type="
css" />
<attribute name="
loadratio
" type="
number" />
<attribute name="
mask
" type="
view" />
<attribute name="
opacity
" type="
opacity" value="
"1.0"" />
<attribute name="
pixellock
" type="
booleanLiteral" />
<attribute name="
resource
" type="
string" />
<attribute name="
rotation
" type="
numberExpression" value="
"0"" />
<attribute name="
visible
" type="
boolean" value="
"true"" />
<attribute name="
width
" type="
sizeExpression" />
<attribute name="
x
" type="
numberExpression" value="
"0"" />
<attribute name="
xoffset
" type="
numberExpression" value="
"0"" />
<attribute name="
y
" type="
numberExpression" value="
"0"" />
<attribute name="
yoffset
" type="
numberExpression" value="
"0"" />
<method name="
construct
" args="
parent,
args" />
<method name="
getMouse
" args="
xory" />
<method name="
play
" args="
f,
rel" />
<method name="
seek
" args="
secs" />
<method name="
setAlign
" args="
align" />
<method name="
setLayout
" args="
layoutobj" />
<method name="
setPan
" args="
p" />
<method name="
setPlay
" args="
b" />
<method name="
setSource
" args="
source,
cache,
headers" />
<method name="
setX
" args="
v,
force" />
<method name="
setY
" args="
v,
force" />
<method name="
stop
" args="
f,
rel" />
</class>
JavaScript Synopsis
public
LzView extends
LzNode
{
public var
frame
:
NumberExpression = 0.0;
public var
height
:
Number = 0.0;
public var
layouts
:
Object = null;
public var
mask
:
LzView;
public var
pixellock
:
BooleanLiteral = null;
public var
visible
:
Boolean = true;
public var
width
:
Number = 0.0;
public var
x
:
Number = 0.0;
public var
xoffset
:
NumberExpression = 0.0;
public var
y
:
Number = 0.0;
public var
yoffset
:
NumberExpression = 0.0;
prototype protected function
addSubview
(
s : LzView);
prototype protected function
construct
(
parent,
args);
prototype public function
containsPt
(
x : Number,
y : Number) :
Boolean;
prototype public function
getBounds
() :
Object;
prototype public function
getID3
() :
Object;
prototype public function
getMouse
(
xory) :
Number;
prototype public function
getPan
() :
Integer;
prototype public function
getVolume
() :
Integer;
prototype protected function
getWidth
();
prototype public function
getZ
() :
Integer;
prototype protected function
init
();
prototype public event
onblur
;
prototype public event
onload
;
prototype public event
onplay
;
prototype public event
onstop
;
prototype public event
onx
;
prototype public event
ony
;
prototype public function
play
(
f : Integer,
rel : Boolean);
prototype public function
searchSubviews
(
prop : String,
val) :
LzView;
prototype public function
seek
(
secs : Integer);
prototype public function
sendBehind
(
v : LzView) :
Boolean;
prototype public function
setAAActive
(
s : Boolean,
mc);
prototype public function
setAAName
(
s : string,
mc);
prototype public function
setAASilent
(
s : string,
mc);
prototype public function
setAlign
(
align);
prototype public function
setBGColor
(
bgc : Integer);
prototype public function
setColor
(
c : Integer);
prototype public function
setCursor
(
cursor : String);
prototype public function
setHeight
(
v : Number);
prototype public function
setLayout
(
layoutobj : Object);
prototype public function
setOpacity
(
v : Number);
prototype public function
setPan
(
p : Integer);
prototype public function
setPlay
(
b : Boolean);
prototype public function
setResource
(
resourceName : String);
prototype public function
setSource
(
source : String,
cache : String,
headers : String);
prototype public function
setValign
(
valign);
prototype public function
setVolume
(
v : Integer);
prototype public function
setWidth
(
v : Number);
prototype public function
setX
(
v : Number,
force);
prototype public function
setXOffset
(
o : Integer);
prototype public function
setY
(
v : Number,
force);
prototype public function
setYOffset
(
o : Integer);
prototype public function
stop
(
f : Integer,
rel : Boolean);
prototype public function
unload
();
}