- 1. Flag Dependent Actions – where particular parts of an action list are only executed if a particular flag is set to, say, ‘ON’. (Conditional Logic Statements)
2. Making objects / pages appear – you can have certain objects appear on screen in response to a flag being set to ‘ON’, and have them disappear when the flag is set to ‘OFF’
3. Disabling buttons – you can disable a button by having all actions dependent on a flag
A flag can be set by creating an action on a button push/release, page load, or app load event. Whilst in the action editor, select ‘Set a Flag’ as the action type, choose the flag from the drop down list & set the value (either ‘ON’ or ‘OFF’). You can also choose to set an entire flag group to ON or OFF.
It is often useful to use the “App Startup Actions” editor to set the default state of certain flags, so that they are set to “ON” when the app is launched.
Flag Dependent Actions
At the point at which actions are due to execute (ie after their delay, if any), the system can look at the state of a flag to determine whether to actually process the action. To set this up, simply choose a ‘Dependent Flag’ before adding the action, and choose the value that flag must be equal to in order for the action to occur.
Making objects appear
Merged pages, and page objects can have an optional ‘Reveal’ flag, which means that they only appear if a flag is set to ‘ON’. This can be useful for bringing up device remote controls etc.
Disabling buttons
Whilst dependent actions are only executed if the state of a flag matches the required state, the decision whether or not to execute the action is made at the time the action is supposed to execute.
It is also possible to completely disable all actions from occurring, based on a global button dependent flag. This is configured by expanding the ‘Actions’ menu for the button. If a dependent flag is selected, and the condition is not met at the point that the button is pressed / released, then no associated actions will occur – whether they themselves are dependent on a flag or not – effectively you are disabling the button, based on the condition of a flag.
Related Topics
Animating Your Project
Adding Buttons to your Project
Implementing Press & Hold
Tags
add edit change flags signs on off swap