Effects allow the appearance of images to be enhanced or distorted in various ways. Many effects are provided with Lightwing that can be applied to images, video or solid colors for objects, boxes, page backgrounds and fonts. This example uses the effect option to apply several different image effects to the images used for the page backgrounds. This overrides the default background effect, which is named Background. An extension of .pfx is assumed for effects.
Image effects must be used for page backgrounds. Their names begin with the term Image and they can be used to display images or video. Effects which have the term Animate in their names provide animated effects. Effects which have the term Reverse in their names run their animations in reverse and effects which have the term Cycle in their names run a complete animation cycle, forward and then reverse.
The arg0 and arg1 options define effect-specific parameters for the selected image effect. Up to four floating-point values are passed to the effect for arg0 and, optionally, another four floating-point values for arg1. The meaning of these values is different for each effect. These parameters are required by some effects, but ignored by the default background effect. To determine the appropriate values for particular effects, refer to the comments in the effect files. Also refer to the online Scripting Guide for more details about these commands.
// Scripting Tutorial - Page Effects version: 1.0 page: Mercury time: 1, 3 image: PlanetMercuryBackground.pvr effect: Image text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Mercury!" page: Venus time: 1, 3 image: PlanetVenusBackground.pvr effect: ImageZoomAnimateCycle arg0: 0 0 1 1 arg1: 0.25 0.25 3 3 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Venus!" page: Earth time: 1, 3 image: PlanetEarthBackground.pvr effect: ImageBlackWhiteAnimateCycle arg0: 1, 1, 1 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Earth!" page: Mars time: 1, 3 image: PlanetMarsBackground.pvr effect: ImageScatterAnimateCycle arg0: 0.05, 0.05 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Mars!" page: Jupiter time: 1, 3 image: PlanetJupiterBackground.pvr effect: ImageColorReplaceAnimateCycle arg0: 0, 1, 0, 1 arg1: 0, 0, 1, 1 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Jupiter!" page: Saturn time: 1, 3 image: PlanetSaturnBackground.pvr effect: ImageGlassAnimateCycle arg0: 0.1, 0.1 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Saturn!" page: Uranus time: 1, 3 image: PlanetUranusBackground.pvr effect: ImageRandomMaskAnimateCycle arg0: 0.2, 0.2 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Uranus!" page: Neptune time: 1, 3 image: PlanetNeptuneBackground.pvr effect: ImageStaticAnimateCycle arg0: 1, 1 text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Neptune!" page: Pluto time: 1, 3 image: PlanetPlutoCharonBackground.pvr effect: ImagePixelAnimateCycle text: OpenSansBold_100 time: 1, 2 fade: 1, 1 position: 50, 50 align: CenterCenter type: "Hello Pluto!" jump: Mercury