marquee
Module(s): vncanvas-base, vncanvas-cform
Description: A cform element acting as a marquee text.
- This is the 'timer' cform element converted to a general purpose marquee text.
- Note: Use only on a 'cform', not a 'form'
- Instantiating cform elements without using "cform" is not recommended.
marquee, {param} |
Creates a marquee text. The marquee element follows the styling of the cform container. Parameters are given as {param:value, param:value, ...} |
Parameter | Attributes and Description |
---|---|
name:"marquee_id"
|
This sets the id of the marquee. If the name
contains the string "timer" (e.g. timer1, countdown_timer, etc.), the
marquee is set to timer mode.
|
x:offset_from_top_left
|
Horizontal position of the maquee element from the
top-left of viewport window.
|
y:offset_from_top_left
|
Vertical position of the marquee element from the
top-left of viewport window.
|
w:width
|
Width of the marquee element.
|
h:height
|
Height of the marquee element.
|
fps:number
|
Optional
The target frames per second.
For timer mode, this defaults to 1fps. |
frames:["array_of_text"]
|
Optional, for non-timer mode only
The text to display per frame.
|
timeout:time_in_seconds
|
Optional, for timer mode only
The number of seconds for timer expiration.
If not given, the timer operates as an upcounter with no expiration. |
link:[keyword-value pair]
|
Optional, for timer mode only
The value of link is executed upon expiration of
the timer used as a downcounter.
The keyword-value is exactly as you would declare it in a scriptline but enclosed in square brackets ([...]). Note: Technically, any keyword-value is allowed, but use only those keywords needed for flow control, such as "jump" and "set". |
This creates a marquee text that displays different text per second.
chapter = [ ... marquee, {name:"sample", x:0, y:0, w:100, h:50, fps:1, frames:["This", "is", "a", "sample", "marquee."]}, ... ];
This creates and displays a 60 second downcounter at the given location and
jumps to "end_label" upon timer expiration.
chapter = [ ... marquee, {name:"timer", x:0, y:0, w:100, h:50, timeout:60, link:[jump, "end_label"]}, ... ];