Since animated horizontal ticker scrolls are often used on digital signs, Lightwing offers the ticker command to make this easy. This example shows several ticker commands with constant and variable text.
Note that tickers may not scroll perfectly smoothly on your Windows system, depending upon a lot of factors, like the graphics card and other software you have installed. This is a key reason Lightwing uses a customized embedded Linux system designed specifically to play digital signage well. It actually works better than most Windows PCs with even more powerful processors.
The ticker command has mostly the same options as the text command so only the most essential ones are shown here. The first parameter defines the name and size of the font. The underscore symbol in the font file names are required. 40 fonts are provided with Lightwing in sizes ranging from 10 to 200 pixel heights in increments of 10.
The shadow command enables an optional, automatic drop-shadow effect for the font named OpenSansBold_100. This command can be repeated for any number of fonts and remains in effect for the entire script. Since this command is global in nature, it should appear before the first page. The offset option defines the size of the drop-shadow in pixel units. Positive values shift the drop-shadow to the right and down, whereas negative values would shift it to the left and up.
The time option is similar to the time option of the page command, except that the first value defines when the text first begins to appear on the page. The second value is the time duration of the ticker on the page.
The position option defines where the ticker is placed on the page. The first value is ignored for tickers. These coordinates range from 0 to 100 (for horizontal, vertical and depth, regardless of the display resolution) with the origin point at the top left of the display. The third value (depth) is usually optional and not shown here.
The rate option defines the scroll animation speed of the ticker independent of the page duration. Otherwise the ticker’s speed will be determined by the time duration of the page.
The loop option defines if the scroll animation of the ticker will repeat continuously. Otherwise the ticker will default to scrolling only once for the duration of the page.
Finally, the type option defines the actual ticker string to draw on the page. Use double quotes to specify a constant text string, or a variable name such as DateLong (without the double quotes) to draw variable text, such as today’s date, time or text from RSS or CSV sources. Also refer to the online Scripting Guide for more details about these commands.
// Scripting Tutorial - Tickers version: 1.0 shadow: OpenSansBold_100 offset: 5 page: Mercury time: 1, 3 image: PlanetMercuryBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Mercury!" page: Venus time: 1, 3 image: PlanetVenusBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Venus!" page: Earth time: 1, 3 image: PlanetEarthBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Earth!" page: Mars time: 1, 3 image: PlanetMarsBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Mars!" page: Jupiter time: 1, 3 image: PlanetJupiterBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Jupiter!" page: Saturn time: 1, 3 image: PlanetSaturnBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Saturn!" page: Uranus time: 1, 3 image: PlanetUranusBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Uranus!" page: Neptune time: 1, 3 image: PlanetNeptuneBackground.pvr ticker: OpenSansBold_100 time: 1, 2 position: 0, 50 rate: 50 loop: on type: "Hello Neptune!" page: Pluto time: 1, 3 image: PlanetPlutoCharonBackground.pvr text: OpenSansBold_100 time: 1, 2 position: 50, 50 align: CenterCenter type: "Today is:" ticker: OpenSansBold_100 time: 1, 2 position: 0, 70 rate: 50 loop: on type: DateLong jump: Mercury