Core. FrameAnimation

Node keyframe animation class. Parse the animation of node created in IDE.

Constructor

new FrameAnimation()

Extends

Member

_isReverse :Boolean

Is it in reverse order?
Inherited From:

alpha :Number

The transparency value is 0-1 and the default value is 1, which means opacity. Changing the alpha value affects drawcall.
Inherited From:

autoSize :Boolean

Specifies whether to compute wide and high data automatically. The default value is false.

Sprite is wide and high, defaults to 0, and does not change with the rendering content. If you want to get the width of the drawing content, you can set the property as true or get it by the getBounds method. Set to true, has some impact on performance.

Inherited From:

blendMode :String

Specifies the blending mode to use. Currently only support "lighter"".
Inherited From:

cacheAs :String

Specifies whether the display object is cached as a static image. When cacheAs is changed, the child object is automatically cached, and the reCache method is invoked manually to update the cache.

It is proposed to cache complex content that is not constantly changing into a static image, which can greatly improve rendering performance. CacheAs has "None", "normal" and "bitmap". The three values are optional.

  • The default is "None" and does not do any caching.
  • When the value is "normal", the canvas cache is carried out in canvas mode, and the command cache is in webgl mode.
  • When bitmap is used, canvas mode is still the canvas cache, and the renderTarget buffer is used in webgl mode.
  • Webgl renderTarget cache model disadvantages: additional renderTarget objects will be created to increase memory overhead, cache area has a maximum 2048 restrictions, continuous redraw will increase CPU overhead. Advantages: drastically reduce drawcall, rendering the highest performance. *

    Inherited From:

    cacheAsBitmap :Boolean

    Specifies whether the display object is cached as a static image. Functions with cacheAs's normal mode. It is recommended to use cacheAs instead.
    Inherited From:

    count :int

    The total number of frames in the current animation.
    Inherited From:

    customRenderEnable :Boolean

    Inherited From:

    destroyed :Boolean

    [只读] Has it been destroyed?. Object cannot be used after destruction.
    Inherited From:

    displayedInStage :Boolean

    Indicates whether it is displayed in the display list.
    Inherited From:

    filters :Array

    Filter set. You can set multiple filter combinations.
    Inherited From:

    globalScaleX :Number

    Gets the global X axis scaling relative to stage (which adds the scaling value of the father node).
    Inherited From:

    globalScaleY :Number

    Gets the global Y axis scaling relative to stage (which adds the scaling value of the father node).
    Inherited From:

    graphics :Graphics

    Drawing object. Encapsulates the interface to draw bitmaps and vector diagrams, and all Sprite drawing operations are implemented through Graphics.
    Inherited From:

    height :Number

    Displays the height of the object, per pixel, and defaults to 0.

    This height is used for mouse collision detection and does not affect the display object image size. You need to zoom in on the image of the display object. Use scale, scaleX, and scaleY.

    You can get the actual height of the object image through getbounds.

    Inherited From:

    hitArea :Object

    You can set a Rectangle area as the click area, or set one HitArea As a click area, you can set clickable and clickable areas within HitArea.

    If hitArea is not set, collisions are made according to the region formed by the width and height.

    Inherited From:

    hitTestPrior :Boolean

    Specifies whether mouse event detection preferentially detects itself or preferentially detects its child object. The mouse event detection occurs at the capture phase of the mouse event. At this stage, the engine will begin to recursively check stage and its child objects from stage until the target object is hit or missed.

    If false, the child object is preferentially detected, and when a child object is hit, interrupt detection is done to hit the target. If you do not hit any sub object, then the object detection; if true, then the priority detection object, if the object is not directly hit, interrupt detection, said did not hit the target; if the object is hit, further iterative detection of its children, in order to confirm the final target.

    Reasonable use of this property, can reduce the mouse event detection nodes, improve performance. Can be set to true: the developer does not care about the mouse event detection result of the child node of the node, which is the mouse event detection point of the node as its child node.

    The View component of the Stage object and UI defaults to true.

    Inherited From:
    Default Value:
    • false优先检测此对象的子对象,当递归检测完所有子对象后,仍然没有找到目标对象,最后再检测此对象。

    index :int

    The index of the animation's current frame.
    Inherited From:

    interval :int

    Frame interval time in animation (in milliseconds). The default value depends on Config.animationInterval=50, and you can change the default frame interval by Config.animationInterval.

    Frame interval time to set independent of the animation, you can use the set interval note: if the animation is playing, set the start time is reset after a frame cycle timer for the current time, that is to say, if the frequent set interval, will cause the animation frame update time interval will be slower than expected, not even update.

    Inherited From:

    isPlaying :Boolean

    Is it in play?.
    Inherited From:

    loop :Boolean

    When looping is called, the value is set to the specified parameter value when calling the play (...) method.
    Inherited From:

    mask :Sprite

    Mask, you can set an object (support bitmap and vector diagram), according to the object shape for mask display.

    [note] the mask object coordinate system is relative to the mask object itself, and is different from the Flash mechanism

    Inherited From:

    mouseEnabled :Boolean

    Do you accept mouse events?. The default is false. If you listen to the mouse event, you will automatically set the property of the object and the parent node. The value of mouseEnable is true (if the parent node is manually set to false, it will not change). *
    Inherited From:

    mouseThrough :Boolean

    Is the mouse event collision detected with this object?. Collision detection occurs at the capture phase of the mouse event. At this stage, the engine will start testing stage and its child objects recursively from stage until it finds the hit target object or misses any object.

    The penetration indicates that the location of the mouse event is hit when it is in the drawing area of the object, and is independent of the object's width, height, and the hitArea attribute of the Rectangle object. If the sprite.hitArea value is a HitArea object, the mouse event response area of the object is declared explicitly, and the width, height, and mouseThrough attributes of the object are ignored.

    The properties that affect the target mouse event response area are: width, height, hitArea, and the priority sequence is: hitArea (type:HitArea), >hitArea (type:Rectangle), >width/height.

    Inherited From:
    Default Value:
    • false不可穿透,此对象的鼠标响应区域由width、height、hitArea属性决定。

    mouseX :Number

    Returns the X axis coordinate information of the mouse in this object coordinate system.
    Inherited From:

    mouseY :Number

    Returns the Y axis coordinate information of the mouse in this object coordinate system.
    Inherited From:

    name :String

    Node name.
    Inherited From:
    Default Value:
    • ""

    numChildren :int

    Number of child objects.
    Inherited From:

    optimizeScrollRect :Boolean

    Specifies whether or not the display object that uses scrollRect is optimized. The default is false (not optimized).

    When ture: this object uses the scrollRect set display contents without rendering display outside the region, to improve performance (if the sub object rotation or zoom center offset, display screening are not accurate).

    Inherited From:

    parent :Node

    Parent node.
    Inherited From:

    pivotX :Number

    The position of the center of the axis of the X axis, in pixels, and defaults to 0. The center of the axis affects the position of the object, the center of the scale, the center of rotation.
    Inherited From:

    pivotY :Number

    The position of the center of the axis of the Y axis, in pixels, and defaults to 0. The center of the axis affects the position of the object, the center of the scale, the center of rotation.
    Inherited From:

    rotation :Number

    The rotation angle defaults to 0. In angle.
    Inherited From:

    scaleX :Number

    X axis scaling value, defaults to 1. Set to negative, you can achieve horizontal inversion effects, such as scaleX=-1.
    Inherited From:

    scaleY :Number

    Y axis scaling value, defaults to 1. Set to negative, enabling vertical inversion, such as scaleX=-1.
    Inherited From:

    scrollRect :Rectangle

    Display a rectangular rolling range object, has the effect of cutting (if you only want to limit the object rendering area, please use viewport), set optimizeScrollRect=true, can optimize the trimmed area content rendering.

    The difference between srollRect and viewport: 1.srollRect comes with clipping effects, viewport only affects whether child objects render, and does not have clipping effects (higher performance).
    *

    Inherited From:

    skewX :Number

    The horizontal tilt angle defaults to 0. In angle.
    Inherited From:

    skewY :Number

    Vertical tilt angle, defaults to 0. In angle.
    Inherited From:

    stage :Stage

    On the stage stage References.
    Inherited From:

    staticCache :Boolean

    When cacheAs is not null, this value is valid. When staticCache=true is changed, the child object does not automatically update the cache, and can only be manually refreshed by calling the reCache method.
    Inherited From:

    texture :Texture

    Set a Texture instance and display this image (if it has been previously drawn, it will be removed). Equivalent to graphics.clear (); graphics.drawImage ()
    Inherited From:

    timer :Timer

    The time controller defaults to global Laya.timer. You can also separate instances of a Timer to control time scaling
    Inherited From:

    transform :Matrix

    Object matrix information. By setting the matrix, you can achieve node rotation, zoom, displacement effect.

    Matrix for more information, please refer to Matrix

    Inherited From:

    viewport :Rectangle

    Outside the viewport viewport size, sub objects will not be rendered (if you want to achieve the effect of cutting, please use srollRect), reasonable use can improve the rendering performance. For example, a map block made up of small pictures will not render the small picture outside viewport

    The difference between srollRect and viewport: 1. srollRect comes with clipping effects, and viewport only affects render of child objects, rendering without clipping (higher performance).
    *

    Inherited From:
    Default Value:
    • null

    visible :Boolean

    Indicates whether it is visible and defaults to true. If the setting is not visible, the node will not be rendered.
    Inherited From:

    width :Number

    Displays the width of the object, per pixel, and defaults to 0.

    This width is used for mouse collision detection and does not affect the display object image size. You need to zoom in on the image of the display object. Use scale, scaleX, and scaleY.

    You can get the actual width of the display object image through getbounds.

    Inherited From:

    wrapMode :int

    The play order type: play forward AnimationBase.WRAP_POSITIVE (the default), play for reverse play for pingpong AnimationBase.WRAP_REVERSE, AnimationBase.WRAP_PINGPONG (as in the specified order after the end of play, if it continues to broadcast, it will change the playback order).
    Inherited From:
    Default Value:
    • 0

    x :Number

    Represents the horizontal coordinate value of the display object relative to the parent container.
    Inherited From:

    y :Number

    Represents the vertical coordinate value of the display object relative to the parent container.
    Inherited From:

    zOrder :Number

    Z sorting, changing this value, will reorder all objects in the same container according to the size of the value. The bigger the value, the closer it gets up. The default is 0, and sorted according to the addition order.
    Inherited From:

    Methods

    _displayToIndex()

    _setParent()

    Inherited From:

    addChild(node) → {Node}

    Adding child nodes.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Node object
    Returns:
    Type:
    Node
    Returns the node added

    addChildAt(node, index) → {Node}

    Adds a child node to the specified index location.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Node object.
    index int Index location.
    Returns:
    Type:
    Node
    Returns the node added.

    addChildren()

    Adding child nodes in batches
    Inherited From:
    Parameters:
    Name Type Attributes Description
    ...args Rest <repeatable>
    Innumerable child nodes.

    addLabel(label, index)

    Adds a frame tag to the frame of the specified index. When an animation is broadcast to the index frame, the Event.LABEL event is dispatched and the dispatch event is completed after the current frame screen is updated.
    Inherited From:
    Parameters:
    Name Type Description
    label String Frame tag name
    index int Frame index

    clear() → {AnimationBase}

    Stop animation playback and clear object properties. After that, the object pool can be stored to facilitate object reuse.
    Overrides:
    Returns:
    Type:
    AnimationBase
    Returns the object itself

    clearTimer(caller, method)

    Clean timer. Function same as Laya.timer.clearTimer ().
    Inherited From:
    Parameters:
    Name Type Description
    caller Object Execute domain (this).
    method function Callback method at the end.

    contains(node) → {Boolean}

    Does the current container contain the specified? Node Node object.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Designated Node Node object.
    Returns:
    Type:
    Boolean
    A Boolean value indicating whether the specified Node node object is included.

    customRender(context, x, y)

    Custom update, render display objects. It is generally used to extend the rendering mode. Please use it properly. This may cause rendering on the accelerator.

    Be careful Do not add or delete tree nodes in this function, otherwise it will affect the traversal of tree nodes.

    Inherited From:
    Parameters:
    Name Type Description
    context RenderContext Rendering context references.
    x Number X axis coordinate.
    y Number Y axis coordinate.

    destroy(destroyChild)

    Destroy this object. The destroy object defaults to removing itself from the parent node and cleaning its reference relationship and waiting for the JS automatic garbage recovery mechanism to be recycled. No more can be used after destroy.

    Destroy removes its own event listening, its own timer listening, removing the child object and removing itself from the parent node.

    Inherited From:
    Parameters:
    Name Type Description
    destroyChild Boolean (optional) destroy the child node at the same time. If the value is true, the child node is destroyed, otherwise the child node is not destroyed.

    destroyChildren()

    Destroy all child objects without destroying themselves.
    Inherited From:

    drawToCanvas(canvasWidth, canvasHeight, x, y) → {HTMLCanvas}

    Draw current Sprite reach Canvas Go ahead and return a HtmlCanvas.

    The result of the drawing can be used as a picture source to be drawn into another Sprite:

    var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);// Draw sprites to canvas var texture:Texture = new Texture(htmlCanvas);// Using htmlCanvas to create Texture var sp:Sprite = new Sprite().pos(0, 200);// Create sprite and bring it down to the 200 position sp.graphics.drawImage(texture);// Draw screenshots to sprites Laya.stage.addChild(sp);// Show the sprite to the stage

    You can also get the original picture data and share it on the Internet, so as to achieve the screenshot effect:

    var htmlCanvas:HTMLCanvas = sprite.drawToCanvas(100, 100, 0, 0);// Draw sprites to canvas var canvas:* = htmlCanvas.getCanvas();// Gets the native canvas object trace(canvas.toDataURL("image/png"));// Print picture Base64 information, which can be sent to the server or saved as pictures
    Inherited From:
    Parameters:
    Name Type Description
    canvasWidth Number Canvas width.
    canvasHeight Number Canvas height.
    x Number Plotted X axis offset.
    y Number Plotted Y axis offset.
    Returns:
    Type:
    HTMLCanvas
    HTMLCanvas object.

    event(type, dataopt) → {Boolean}

    Dispatch events.
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    type String Event type.
    data Object <optional>
    null data (optional) callback data. Be careful: If you need to pass multiple parameters, P1, P2, P3, you can use the array structure, such as: [p1,p2,p3,...] If you need to call a single parameter P, and P is an array, you need to use a structure such as: [p] Other single parameters, P, can be passed directly to the parameter P.
    Returns:
    Type:
    Boolean
    Is there a listener for this event type? If there is a listener, the value is true, otherwise the value is false.

    frameLoop(delay, caller, method, argsopt, coverBefore)

    Executes a function repeatedly (based on frame rate). Function same as Laya.timer.frameLoop ().
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    delay int How many frames (frames per frame) are spaced?.
    caller Object Execute domain (this).
    method function Callback method at the end.
    args Array <optional>
    null args Optional callback parameters.
    coverBefore Boolean (optional) whether the delay is covered before default is true.

    frameOnce(delay, caller, method, argsopt, coverBefore)

    Perform a function at a certain time (based on frame rate). Function same as Laya.timer.frameOnce ().
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    delay int Delays several frames (frames per unit).
    caller Object Execute domain (this)
    method function Callback method at the end
    args Array <optional>
    null args Optional callback parameters
    coverBefore Boolean (optional) whether the delay is covered before default is true

    fromImage(url) → {Sprite}

    Create a new one based on the image address Sprite Object is used to load and display this picture.
    Inherited From:
    Parameters:
    Name Type Description
    url String Picture address.
    Returns:
    Type:
    Sprite
    Returns the new Sprite object.

    fromParentPoint(point) → {Point}

    Converts the parent container coordinate to the local coordinate system.
    Inherited From:
    Parameters:
    Name Type Description
    point Point Parent container coordinate point.
    Returns:
    Type:
    Point
    Converted point.

    getBounds() → {Rectangle}

    Gets the rectangular display area of the object in the parent container coordinate system.

    Be careful: The amount of calculation is large, as little as possible.

    Inherited From:
    Returns:
    Type:
    Rectangle
    Rectangular region.

    getChildAt(index) → {Node}

    Gets the child node object based on the index position of the child node.
    Inherited From:
    Parameters:
    Name Type Description
    index int Index location
    Returns:
    Type:
    Node
    Child node

    getChildByName(name) → {Node}

    Gets the child node object based on the name of the child node.
    Inherited From:
    Parameters:
    Name Type Description
    name String Child node name.
    Returns:
    Type:
    Node
    Node object.

    getChildIndex(node) → {int}

    Gets the index position of the child node based on the child node object.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Child node.
    Returns:
    Type:
    int
    The index position at which the child node is located.

    getGraphicBounds(realSize) → {Rectangle}

    Returns the drawing object in this instance Graphics A display area that does not include child objects.
    Inherited From:
    Parameters:
    Name Type Description
    realSize Boolean (optional) use the true size of the picture, and defaults to false
    Returns:
    Type:
    Rectangle
    A Rectangle object that represents the captured display area.

    getMousePoint()

    Gets the mouse coordinate information relative to this object.
    Inherited From:

    getSelfBounds() → {Rectangle}

    Gets the rectangular display area of the object in its own coordinate system.

    Be careful: The amount of calculation is large, as little as possible.

    Inherited From:
    Returns:
    Type:
    Rectangle
    Rectangular region.

    globalToLocal(point, createNewPoint) → {Point}

    Converts the global coordinates of stage to local coordinates.
    Inherited From:
    Parameters:
    Name Type Description
    point Point Global coordinate point.
    createNewPoint Boolean (optional) whether to create a new Point object as the return value, defaults to false, returns the object creation cost using the input point object.
    Returns:
    Type:
    Point
    The point at which the coordinates are converted.

    gotoAndStop(position)

    Switch the animation to the specified frame and park it there.
    Inherited From:
    Parameters:
    Name Type Description
    position Object Frame index or frame label

    hasListener(type) → {Boolean}

    inspect EventDispatcher Object registers any listeners for a particular event type.
    Inherited From:
    Parameters:
    Name Type Description
    type String Event type.
    Returns:
    Type:
    Boolean
    If the specified type of listener has been registered, the value is true; otherwise, the value is false.

    hitTestPoint(x, y) → {Boolean}

    Detects if a point is within this object.
    Inherited From:
    Parameters:
    Name Type Description
    x Number Global x coordinates.
    y Number Global y coordinates.
    Returns:
    Type:
    Boolean
    Indicates whether it is within an object.

    isMouseEvent(type) → {Boolean}

    Detects whether the specified event type is a mouse event.
    Inherited From:
    Parameters:
    Name Type Description
    type String Event type.
    Returns:
    Type:
    Boolean
    If it is a mouse event, the value is true; otherwise, the value is false.

    loadImage(url, xopt, yopt, widthopt, heightopt, completeopt) → {Sprite}

    Load and display a picture. The function is equivalent to the graphics.loadImage method. Support asynchronous loading.

    Note: many calls to loadImage draw different pictures, which will be displayed simultaneously.

    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    url String Picture address.
    x Number <optional>
    0 x (optional) displays the x position of the picture.
    y Number <optional>
    0 y (optional) displays the Y position of the picture.
    width Number <optional>
    0 width (optional) display the width of the picture, set to 0, which indicates the default width of the picture.
    height Number <optional>
    0 height (optional) display the height of the picture, set to 0, which indicates the default height to use the picture.
    complete Handler <optional>
    null complete (optional) the load completes the callback.
    Returns:
    Type:
    Sprite
    Returns the sprite object itself.

    localToGlobal(point, createNewPoint) → {Point}

    Converts local coordinates to global coordinates relative to stage.
    Inherited From:
    Parameters:
    Name Type Description
    point Point Local coordinate point.
    createNewPoint Boolean (optional) whether to create a new Point object as the return value, defaults to false, returns the object creation cost using the input point object.
    Returns:
    Type:
    Point
    The point at which the coordinates are converted.

    off(type, caller, listener, onceOnly) → {EventDispatcher}

    from EventDispatcher Delete listeners in object.
    Inherited From:
    Parameters:
    Name Type Description
    type String Event type.
    caller Object The domain of the event listener function.
    listener function Event listener function.
    onceOnly Boolean (optional) if the value is true, only the listeners added by the once method are removed.
    Returns:
    Type:
    EventDispatcher
    this EventDispatcher Object.

    offAll(typeopt) → {EventDispatcher}

    from EventDispatcher Removes all listeners that specify the type of event in the object.
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    type String <optional>
    null type (optional) event type. If the value is null, all types of listeners for this object are removed.
    Returns:
    Type:
    EventDispatcher
    this EventDispatcher Object.

    on(type, caller, listener, argsopt) → {EventDispatcher}

    Adds an event listener to enable listeners to receive event notifications.

    If you listen to mouse events, you automatically set the property of your own and father nodes. The value of mouseEnabled is true (if the parent node is mouseEnabled=false, then stop setting the parent node mouseEnabled attribute).

    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    type String Event type.
    caller Object The domain of the event listener function.
    listener function Event listener function.
    args Array <optional>
    null args Optional callback parameters for the event listener function.
    Returns:
    Type:
    EventDispatcher
    This EventDispatcher object.

    once(type, caller, listener, argsopt) → {EventDispatcher}

    Adds an event listener to enable listeners to receive event notifications that automatically remove listeners after the listener event responds.

    If you listen to mouse events, you automatically set the property of your own and father nodes. The value of mouseEnabled is true (if the parent node is mouseEnabled=false, then stop setting the parent node mouseEnabled attribute).

    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    type String Event type.
    caller Object The domain of the event listener function.
    listener function Event listener function.
    args Array <optional>
    null args Optional callback parameters for the event listener function.
    Returns:
    Type:
    EventDispatcher
    This EventDispatcher object.

    parentRepaint()

    CacheAs sets the cache invalidation for all parent objects.
    Inherited From:

    pivot(x, y) → {Sprite}

    Set pivot point. Equivalent to setting the pivotX and pivotY attributes, respectively.

    Because the return value is the Sprite object itself, you can use the following syntax: spr.pivot (...).Pos (50, 100);

    Inherited From:
    Parameters:
    Name Type Description
    x Number X axis point.
    y Number Y axis point.
    Returns:
    Type:
    Sprite
    Returns the object itself.

    play(start, loop, nameopt)

    Start animation. Play (...) method is designed to create an instance at any time after all can be invoked when the corresponding resource loaded, called animation frame filling method (set frames) or examples show on the stage, will determine whether there is, if it is, then play.

    With the wrapMode attribute, you can set the type of animation playback sequence.

    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    start Object (optional) specifies the index (int) or the frame tag (String) for the start of the animation. Frame tags can be added and deleted by addLabel (...) and removeLabel (...).
    loop Boolean (optional) loop playback?.
    name String <optional>
    "" name (optional) animation name.

    pos(x, y, speedMode) → {Sprite}

    Set coordinate position. Equivalent to setting the X and Y attributes, respectively.

    Because the return value is the Sprite object itself, you can use the following syntax: spr.pos (...).Scale (...);

    Inherited From:
    Parameters:
    Name Type Description
    x Number X axis coordinate.
    y Number Y axis coordinate.
    speedMode Boolean (optional) is the speed model, the normal call this.x=value assignment, speed mode calls the internal function directly, if not rewritten x, y property, the proposed set to fast mode, higher performance.
    Returns:
    Type:
    Sprite
    Returns the object itself.

    reCache()

    In the case of setting up cacheAs, calling this method refreshes the cache.
    Inherited From:

    removeChild(node) → {Node}

    Delete child node.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Child node
    Returns:
    Type:
    Node
    Deleted nodes

    removeChildAt(index) → {Node}

    Deletes the corresponding child node object according to the index location of the child node.
    Inherited From:
    Parameters:
    Name Type Description
    index int Node index location.
    Returns:
    Type:
    Node
    Deleted nodes.

    removeChildByName(name) → {Node}

    Deletes the corresponding child node object based on the child node name and, if not found, does not throw an exception.
    Inherited From:
    Parameters:
    Name Type Description
    name String Object name.
    Returns:
    Type:
    Node
    Node found ( Node Objects.

    removeChildren(beginIndexopt, endIndexopt) → {Node}

    Removes all child objects from the specified index interval.
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    beginIndex int <optional>
    0 beginIndex Start index.
    endIndex int <optional>
    0x7fffffff endIndex End index.
    Returns:
    Type:
    Node
    Current node object.

    removeLabel(label)

    Deletes the specified frame label.
    Inherited From:
    Parameters:
    Name Type Description
    label String Frame tag name. Note: if it is empty, all frame labels are removed!

    removeSelf() → {Node}

    Remove yourself from the parent container. If you have been deleted, no exception will be thrown.
    Inherited From:
    Returns:
    Type:
    Node
    Current node ( Node Objects.

    render(context, x, y)

    Update, render display objects. Call by system.
    Inherited From:
    Parameters:
    Name Type Description
    context RenderContext Rendering context references.
    x Number X axis coordinate.
    y Number Y axis coordinate.

    repaint()

    After cacheAs, the settings themselves and the parent object cache fail.
    Inherited From:

    replaceChild(newNode, oldNode) → {Node}

    Replace child node.
    Inherited From:
    Parameters:
    Name Type Description
    newNode Node New node.
    oldNode Node Old node.
    Returns:
    Type:
    Node
    Return new node.

    resetNodes()

    Resets the node to restore the node to the state before animation, which is convenient for other animation controls

    scale(scaleX, scaleY, speedMode) → {Sprite}

    Set zoom. Equivalent to setting the scaleX and scaleY attributes, respectively.

    Because the return value is the Sprite object itself, you can use the following syntax: spr.scale (...).Pos (50, 100);

    Inherited From:
    Parameters:
    Name Type Description
    scaleX Number X axis scaling.
    scaleY Number Y axis scaling.
    speedMode Boolean (optional) whether the speed mode is called this.scaleX=value, normal assignment, speed mode directly call internal function, if not override the scaleX property of the scaleY, suggests setting for the rapid mode of higher performance.
    Returns:
    Type:
    Sprite
    Returns the object itself.

    setChildIndex(node, index) → {Node}

    Sets the index position of the child node.
    Inherited From:
    Parameters:
    Name Type Description
    node Node Child node.
    index int New index.
    Returns:
    Type:
    Node
    Returns the child node itself.

    setSelfBounds(bound)

    Set object bounds size, if you have settings, then no longer through the getBounds calculation, reasonable use can improve performance.
    Inherited From:
    Parameters:
    Name Type Description
    bound Rectangle Bounds rectangular region

    size(width, hegiht) → {Sprite}

    Set width height. Equivalent to setting the width and height attributes, respectively.

    Because the return value is the Sprite object itself, you can use the following syntax: spr.size (...).Pos (50, 100);

    Inherited From:
    Parameters:
    Name Type Description
    width Number Width value.
    hegiht Number Height value.
    Returns:
    Type:
    Sprite
    Returns the object itself.

    skew(skewX, skewY) → {Sprite}

    Set tilt angle. Equivalent to setting the skewX and skewY attributes, respectively.

    Because the return value is the Sprite object itself, you can use the following syntax: spr.skew (...).Pos (50, 100);

    Inherited From:
    Parameters:
    Name Type Description
    skewX Number Horizontal tilt angle.
    skewY Number Vertical inclination angle.
    Returns:
    Type:
    Sprite
    Returns the object itself

    startDrag(areaopt, hasInertia, elasticDistanceopt, elasticBackTimeopt, dataopt, disableMouseEvent, ratioopt)

    Drag to start this object.
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    area Rectangle <optional>
    null area (optional) drag area, this area is the current object, registration point, active area (excluding the object width, height), optional.
    hasInertia Boolean (optional) after the mouse is released, is it still inertial sliding, default is false, optional.
    elasticDistance Number <optional>
    0 elasticDistance (optional) the distance of the rubber band effect, 0 is the effect without rubber band, and the default is 0.
    elasticBackTime int <optional>
    300 elasticBackTime (optional) the rebound time of the rubber band is in milliseconds, and the default is 300 ms, optional.
    data Object <optional>
    null data (optional) dragging events with optional data.
    disableMouseEvent Boolean (optional) disables mouse detection of other objects, defaults to false, and sets to true to improve performance.
    ratio Number <optional>
    0.92 ratio (optional) inertial damping coefficient, which affects inertia strength and duration.

    stop()

    Stop animation playback.
    Inherited From:

    stopDrag()

    Stop dragging this object.
    Inherited From:

    timerLoop(delay, caller, method, argsopt, coverBefore, jumpFrame)

    Execute a function repeatedly at regular intervals. Function same as Laya.timer.timerLoop ().
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    delay int Interval time (ms per unit).
    caller Object Execute domain (this).
    method function Callback method at the end.
    args Array <optional>
    null args Optional callback parameters.
    coverBefore Boolean (optional) whether the delay is covered before default is true.
    jumpFrame Boolean The clock is skipping. Time based callback, in the unit time interval, if you can perform multiple callbacks, for performance reasons, the engine defaults to only once. After setting the jumpFrame=true, the callback is executed several times in succession

    timerOnce(delay, caller, method, argsopt, coverBefore)

    Execute a function at regular intervals. Function same as Laya.timer.timerOnce ().
    Inherited From:
    Parameters:
    Name Type Attributes Default Description
    delay int Delay time (in milliseconds).
    caller Object Execute domain (this).
    method function Callback method at the end.
    args Array <optional>
    null args Optional callback parameters.
    coverBefore Boolean (optional) whether the delay is covered before default is true.

    toParentPoint(point) → {Point}

    Converts the local coordinate system to the parent container coordinate system.
    Inherited From:
    Parameters:
    Name Type Description
    point Point Local coordinate point.
    Returns:
    Type:
    Point
    Converted point.

    updateZOrder()

    Reordering according to zOrder.
    Inherited From:

    Event

    added

    Inherited From:
    See:
    • events.Event

    click

    Inherited From:
    See:
    • events.Event

    complete

    Overrides:
    See:
    • events.Event

    display

    Inherited From:
    See:
    • events.Event

    dragend

    Inherited From:
    See:
    • events.Event

    dragmove

    Inherited From:
    See:
    • events.Event

    dragstart

    Inherited From:
    See:
    • events.Event

    label

    Overrides:
    See:
    • events.Event

    mousedown

    Inherited From:
    See:
    • events.Event

    mousemove

    Inherited From:
    See:
    • events.Event

    mouseout

    Inherited From:
    See:
    • events.Event

    mouseover

    Inherited From:
    See:
    • events.Event

    mouseup

    Inherited From:
    See:
    • events.Event

    removed

    Inherited From:
    See:
    • events.Event

    undisplay

    Inherited From:
    See:
    • events.Event