Name

LzSprite() (as2)

Synopsis

JavaScript: LzSprite
Type: Function
Access: private
Runtimes: as2
Topic: Kernel.AS2
Declared in: WEB-INF/lps/lfc/kernel/swf/LzSprite.as

Description

LzSprite.as

Details

Methods (71)

addChildSprite()
protected function addChildSprite(s : LzSprite);
Adds a child sprite to this sprite's display hierarchy
applyBG()
private function applyBG();
applyMask()
private function applyMask(s);
attachBackgroundToChild()
private function attachBackgroundToChild(childsprite);
attachResourceToChildView()
private function attachResourceToChildView(resourceName, childsprite, instName);
This method is usually called by a child view's setResource function. It is useful because the attaching tends to happen in the context of the parent view.
bringToFront()
private function bringToFront();
This method makes this view the frontmost subview of this view's parent.
changeOrder()
private function changeOrder(cSprite, dir, fv, inf);
moves the given child view to the front.
checkPlayStatus()
private function checkPlayStatus();
checkPlayStatus2()
private function checkPlayStatus2();
_cursorGotMouseover()
private function _cursorGotMouseover();
destroy()
private function destroy(recursive);
This method should remove a view, its media, and any of its subviews.
doQueuedPlayAction()
private function doQueuedPlayAction();
doReplaceResource()
private function doReplaceResource(resourceName);
getAttachPoint()
private function getAttachPoint(cSprite);
Gets the movieclip of childview which is the direct child of this view's movieclip
getColor()
private 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.
getColorObj()
private function getColorObj();
getColorTransform()
private 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);
getDepthList()
private function getDepthList();
Returns an array of subviews in depth order
getHeight()
protected function getHeight();
Returns the height of the view.
getMCRef()
private function getMCRef();
Get a reference to the control mc - may be overridden by loader
getMouse()
private function getMouse(xory) : Number;
This method returns the position of the mouse relative to this view.
getPan()
private function getPan() : Integer;
Get the pan of the attached resource
getVolume()
private function getVolume() : Integer;
Get the volume of the attached resource
getWidth()
protected function getWidth();
Returns the width of the view.
getZ()
private function getZ() : Integer;
Get the current z order of the sprite
init()
protected function init();
Called right before the view is shown. See init for more.
__LZfindNextNonNull()
private function __LZfindNextNonNull(arr, pos, dir);
__LZFinishDestroyOnIdle()
private function __LZFinishDestroyOnIdle();
__LZsetClickRegion()
private function __LZsetClickRegion(cr);
makeContainerResource()
private function makeContainerResource();
This method is called when a view that has no resource needs one, either because a layout is being attached, or because a subview with a resource is being added.
makeMasked()
private function makeMasked();
This function applies the MakeMasked view transformer.
play()
private 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.
predestroy()
private function predestroy();
queuePlayAction()
private function queuePlayAction(a, arg1, arg2);
removeBG()
private function removeBG();
removeMask()
private function removeMask();
sendBehind()
private function sendBehind(v : LzSprite) : Boolean;
Puts this view behind one of its siblings.
sendInFrontOf()
private function sendInFrontOf(v : LzSprite) : Boolean;
Puts this view in front of one of its siblings.
sendToBack()
private function sendToBack();
This method makes this view the hindmost subview of this view's parent.
setAAActive()
private function setAAActive(s : Boolean, mc);
Activate/inactivate children for accessibility
setAccessible()
private function setAccessible(accessible : Boolean);
setBGColor()
private function setBGColor(bgc : Integer);
Gives the view a bgcolor that is the same size as the view.
_setButtonSize()
private function _setButtonSize(axis, bsize);
setClickable()
private function setClickable(amclickable);
Makes a view clickable or not clickable.
setClip()
private function setClip(c);
This function sets or removes the clip/mask
setColor()
private 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()
private 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()
private function setContextMenu(cmenu : LzContextMenu);
LzSprite.setContextMenu Install menu items for the right-mouse-button
setCursor()
private function setCursor(cursor : String);
Sets the cursor to the given resource when the mouse is over this view
setDefaultContextMenu()
private function setDefaultContextMenu(cmenu);
setFontName()
private function setFontName(val, prop);
setHeight()
private 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.
setMovieClip()
private function setMovieClip(mc : String, mcID);
This method is called when a view that has no resource needs one, either because a layout is being attached, or because a subview with a resource is being added.
setOpacity()
private function setOpacity(v);
setPan()
private function setPan(p : Integer);
Set the pan of the attached resource
setResource()
private 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
setRotation()
private function setRotation(v : Number);
Sets the rotation for the view to the given value.
setShowHandCursor()
private function setShowHandCursor(s : Boolean);
Shows or hides the hand cursor for this view.
setSource()
private 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.
setVisible()
private function setVisible(amVisible : Boolean);
This method sets the visible attribute of the view and also disables or re-enables any click region associated with the view. Note that a value of null is different from a value of false for this attribute. See the description of the visible attribute for details.
setVolume()
private function setVolume(v : Integer);
Set the volume of the attached resource
setWidth()
private 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()
private function setX(v : Number);
Sets the x position of the view to the given value.
setY()
private function setY(v : Number);
Sets the y position for the view to the given value.
stop()
private function stop(f : Integer, rel : Boolean);
Stop playing the attached resource
stopTrackPlay()
private function stopTrackPlay();
stretchResource()
private 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.
toString()
private function toString();
trackPlay()
private function trackPlay();
updatePlayStatus()
private function updatePlayStatus();
Updates the play percentage
updateResourceSize()
private 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.

Prototype Properties (30)

BACKGROUND_DEPTH_OFFSET
private var BACKGROUND_DEPTH_OFFSET;
bgcolor
private var bgcolor = null;
BUTTON_DEPTH
private var BUTTON_DEPTH = 2;
capabilities
private var capabilities = { ... };
CLIPS_PER_SUBVIEW
private var CLIPS_PER_SUBVIEW = 2;
FIRST_SUBVIEW_DEPTH
private var FIRST_SUBVIEW_DEPTH = 11;
focusable
private var focusable = false;
FOREGROUND_DEPTH_OFFSET
private var FOREGROUND_DEPTH_OFFSET = 0.0;
frame
private var frame = 0.0;
framesloadratio
private var framesloadratio = 0.0;
hassetheight
private var hassetheight = false;
hassetwidth
private var hassetwidth = false;
height
private var height = 0.0;
loadperc
private var loadperc = 0.0;
loadratio
private var loadratio = 0.0;
__LZclickregion
private var __LZclickregion = LzMouseEvents;
__LZisView
private var __LZisView = true;
__lzskipplaychecklimitmax
private var __lzskipplaychecklimitmax = 20;
MASK_DEPTH
private var MASK_DEPTH = 3;
opacity
private var opacity = 1;
rotation
private var rotation = 0.0;
_setrescheight
private var _setrescheight = false;
_setrescwidth
private var _setrescwidth = false;
totalframes
private var totalframes = 0.0;
visible
private var visible = true;
width
private var width = 0.0;
x
private var x = 0.0;
_xscale
private var _xscale = 1;
y
private var y = 0.0;
_yscale
private var _yscale = 1;

JavaScript Synopsis

private function LzSprite(newowner, isroot, args);