Actions

Actions allow you to either launch an animation or execute code.

The two main types of actions are :

  • Press : When the finger touches the screen or the mouse click is pressed.
  • Release : When the finger leaves the screen or the mouse click is released.

Tutorial: create an animation action

To add an animation action to an object you need :

  1. Select an object.
  2. Click on the button « Action » (areq 4).
  3. On the right side, a group "Actions" is created (area 3) :
    • Select the type of action.
    • Select the animation to be performed.
    • Select the animation step.

Tutorial: create a code action

If you want to use code to perform an action, start again from 3 above :

  1. On the right side, a group "Actions" is created (area 3) :
    • Select the type of action.
    • Select "Code".
  2. Open the editor (format for saving a project), click on the "Editor" button (area 4)
  3. Search in the editor for your object.
  4. Edit "onPress :" or "onRelease :" by putting your code between single quotes (example : " onPress : ‘Brightness += 20;’ " or " onPress : 'funcction();' ").

The assignment of code to an action can concern the manipulation of variables or the call to functions.

All you have to do is to test in total representativeness on your material !