event_data

This variable is global in scope and is used to hold a DS Map when used in the appropriate event (e.g. Gesture Events and Broadcast Messages), and -1 at all other times. The actual contents of the DS map will depend on the type of event that triggered it, so refer to the individual sections for those events.

 

Syntax:

event_data;

 

Returns:

DS Map

 

Example:

isFlick = event_data[?"isflick"];

if (isFlick)
{
    flickVelX = event_data[?"diffX"];
    flickVelY = event_data[?"diffY"];
}
else
{
    flickVelX = 0;
    flickVelY = 0;
}

The above code is taken from the Drag End gesture event and checks to see if the vent is a "flick" event, and if it is it extracts the required data from the event_data DS map and uses it to set some variables. If a "flick" event is not detected, then the same variables are set to 0.