Scripting Tutorials
Top  Previous  Next


The following tutorials can be loaded from the Samples area (File | Samples | filename.swi).

.swi File
Tutorial Name
Purpose
helloworld.swi
Hello World
Demonstrate the use of the trace command and Debug Panel
flowcontrol.swi
Variables and Flow Control
Demonstrate the use of variables, if and while statements
button.swi
Button
Demonstrates the on(release) Button Event
button1.swi
Button with rollOver
Demonstrate the on(rollOver), on(rollOut) Button Events.
Demonstrate the _xscale and _yscale properties
calculator.swi
Calculator
Introduces the Text Object with Input and Dynamic text properties. Introduces the Math Object
properties.swi
Object Properties
Introduce the Object properties:
_X, _Y, _xscale, _yscale, _width, _height, _alpha, _rotation, _name and _visible
dragging.swi
Mouse Dragging
Introduces startDragUnlocked(), startDragLocked() and stopDrag() methods. Introduces onSelfEvent( press ) and onSelfEvent( release ) Events to start and stop dragging
droptarget.swi
Drop Target / Target
Demonstrates the use of the _target and _droptarget properties
collide.swi
Collision Detection
Introduces isNearTarget() and isNearThis() methods
game.swi
Simple Gaming
Introduces User defined functions, use of onLoad() Event Handling function to initialise variables and the use of the onEnterFrame() Event Handling function to animate Objects




















It is recommended that Guided mode be selected in the Script Panel for the entry of the following tutorials. The tutorials assume that you are familiar with the SWiSH drawing tools. If you are not familiar, please refer to these tutorials first.