Bambookit Home    Bambookit GUI Tutorial

Back   

IV. Advanced Features

Chapter 20. Motion Scripts (Animations)



Motion Scripts is a time deliminated series of commands that can be attached and executed by any number of widgets. A Motion Script can be attached to a 'single' widget or control, per executing thread.

We can now create 'sliding' panels, image animation, or any number of effects or transitions or sprite animation within the scripts.

XML Element Name

<MotionScript setName="<b>[String]</b> name" setLoop="false"> <Interval setTime="<b>[int]</b>" addToSize="<b>[int]</b>,<b>[int]</b>"/> <Interval setTime="<b>[int]</b>" addToSize="<b>[int]</b>,<b>[int]</b>"/> <Interval setTime="<b>[int]</b>" addToSize="<b>[int]</b>,<b>[int]</b>"/> .... </MotionScript> [String] is the name of the motion script that will be used for a call
[int] any numeric value is valid
setLoop="false" is optional. It is preferred to set it to 'false'. If it will be set to 'true' the script will loop infinitelly. The default value is 'false'
setTime="[int]" set as milliseconds.
You may use addImage instead of addToSize method to display a particular image for the Interval for which time is set in milliseconds.

Examples

Back