A tag that defines a media object that can be associated with a view.
This tag defines a media object, that can be presented within a view. A media object is an image, movie, animation, or sound clip. This tag imports the object into the application, and binds it to a string which can be used within a view. For example:
<canvas height="70"> <resource name="logo" src="images/logo.png"/> <view resource="logo"/> </canvas>
The src attribute refers to the filename of any valid resource type, including an optional directory path relative to the directory of the declaration. Valid resource types for images and animations include: .SWF, .PNG, .JPG, and .GIF; valid audio types include: .MP3.
Audio resources must be MP3 files at one of the following sample rates: 11.025 khz, 22.5 khz, and 44.1 khz, and encoded at no more than 160kbps.
The dataimage example further demonstrates the use of the resource tag.
For details on multi-frame resources, see frame.
| Attributes | |||||
| Name | Usage | Type (Tag) | Type (JS) | Default | Category |
| name | Tag only | token | final | ||
|
The name of a variable that will be set to this object when the
application is started. If this element is directly within a |
|||||
|
|
|||||
| src | Tag only | URL | final | ||
|
The path of a file that contains the source for this object. |
|||||
|
|
|||||
Copyright © 2002-2005 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.