Amulet Widgets
Amulet Widgets View Widgets
Amulet Widgets Image Sequence
The Image Sequence Widget is similar to an animated bitmap. However, instead of being linked to a timer event, the transition between images is linked to a byte (or word) returned from an href function call. The displayed image is determined by scaling the value returned from the href function call. The following algorithm is used:
Image # = {(total # of images) * (value of byte from function - min)}/ (max - min + 1)
The resultant number, truncated to an integer, is the number of the image to display, where the first image in the sequence is numbered 0. For all images to be displayable, (max-min+1) must be greater than or equal to the number of images. Also, if the href function returns a value less than the specified min, the value will be treated as equal to the specified min. Likewise, if the href function returns a value greater than the specified max, the value will be treated as equal to the specified max.
Consider the following example.
A sequence of 7 separate images: Image0 =
, ... Image6 =
.
An href function that returns a byte that ranges between a min of 23 and a max of 232. Although the value returned by the href function may vary with time, only one of the seven images will be displayed at any one time. Table 1, below, maps each value range to the image that will be displayed. Note that values below 23 are treated like a 23, and values above 232 are treated like a 232.

7*(203-23)/((232-23)+1) = 6
7*(173-23)/((232-23)+1) = 5
7*(143-23)/((232-23)+1) = 4
7*(113-23)/((232-23)+1) = 3
7*(83-23)/((232-23)+1) = 2
7*(53-23)/((232-23)+1) = 1
7*(23-23)/((232-23)+1) = 0
Table 1. Image Sequence Example
Parameter="invisible" value="CHECKED" or "UNCHECKED" — Specifies if the Image Sequence is to start out invisible or not. If the attribute is UNCHECKED, then by default the Image Sequence is visible. If the Image Sequence starts out invisible, the only way to make it visible again is via the IWC method reappear().
Parameter="href" value="function" — The function called to retrieve the widget input. See Appendix B for all available functions for the Image Sequence widget. The function is called at an update rate specified by the updateRate attribute.
Parameter="max" value="number" — Maximum value returned from the href function; must be greater than min. If the function returns a byte, the range is 1 - 255 (0x01 - 0xFF). If the function returns a word, the range is 1 - 65535 (0x01 - 0xFFFF).
Parameter="min" value="number" — Minimum value returned from the href function; must be less than max. If the function returns a byte, the range is 0 - 254 (0x00 - 0xFE). If the function returns a word, the range is 0 - 65534 (0x00 - 0xFFFE).
Parameter="sequence" value="image1;image2;image3(etc.)" — List of images used, separated by semicolons. (Images can be either .GIF, .JPG, or .PNG.) The range is 1 - 255 images.
Parameter="updateFreq" value ="number" — Specifies the href function call frequency (specified in seconds, with a single floating-point number). The range is 0.00 - 655.35. A value of 0.00 means update never.
Parameter="updateDelay" value ="number" — Specifies the delay time from when the page is loaded until the first href function call (specified in seconds, with a single floating-point number). The range is 0.00 - 655.35. If this number is not specified, then the delay time defaults to the number in updateFreq.
Parameter="waitForInit" value="CHECKED" or "UNCHECKED" — Specifies if the Image Sequence will wait for valid data before any image will be displayed on the LCD. If CHECKED, the Image Sequence will not display any image until the first packet of data is received. If UNCHECKED, or the attribute is not present, the Image Sequence starts out displaying the first image until the first packet of data is received.
Parameter="noSdram" value="CHECKED" or "UNCHECKED" — Specifies if the images are in sdram or not. If noSdram=CHECKED, then by default the images are located in the serial data flash. If the parameter is false, the images are located in sdram.
Parameter="loadImmediately" value="CHECKED" or "UNCHECKED" — Specifies if the images are loaded immediatly into the sdram for page loads or not. This parameter is only applicable if the noSdram parameter is UNCHECKED. If loadImmediately is CHECKED, then all the images in the Image Sequence will be loaded in the sdram for faster page load. However, this does not affect image to image transition. If loadImmediately is UNCHECKED, then, the images won't be loaded in the sdram. Page loading will be slower because the images needed to be loaded into the sdram first. The default for loadImmediately is UNCHECKED.

Start Here
Development Tools
| Site Use Terms | Terms of Sale | Privacy | Warranty | Site Map | |