Name

splash (as2) — Controls the presentation while the application is loading.

Synopsis

LZX: splash
Type: Class
Access: public
Runtimes: as2
Topic: LZX.Basics

Description

The splash tag controls the presentation while the application is loading.

If the splash element is present but is empty, a progress bar is displayed while the application is loading. For example:

<canvas>
  <splash/>
<canvas>

The splash element may contain "splash view" elements to define the position and behavior of resources that are displayed during the load process. However, these "splash view" elements, although they are declared with a "view" tag, have a limited feature set. That is to say, when you place a view tag inside a splash element, you are not getting the same object that you do when you place a view tag elsewhere on the canvas.

For example, the following program positions an image on the canvas during the "splash" loading portion of the program's execution and removes it once the application has loaded. The example below executes too quickly to be demonsrate the splash view; try it in a larger application to see how it works.

Example 1. using 'splash view' tag

<canvas height="100">
  <splash>
    <view resource="../images/logo.png"/>
  </splash>
</canvas>

You can position more than one image by specifying its coordinates. The persistent attribute on splash tag causes the "splash" views contained within the spash element to remain on the canvas once the load process is complete.

Example 2. persisting splash views

<canvas height="100">
  <splash persistent="true">
    <view x="5" resource="../images/logo.png" />
    <view x="50" resource="../images/logo.png" />
    <view x="150" resource="../images/logo.png" />
  </splash>
</canvas>

Also see the contacts example.

Superclass Chain

splash

Known Subclasses

Details

Initial Attributes (1)

Initial Attributes are given as attributes in LZX but are not generally available as properties in JavaScript.

persistent
<attribute name="persistent" type="xsd:boolean" value=""false"" />
If true, the splash views remain on the canvas after the preload is complete.

LZX Synopsis

<class name="splash">
</class>