Class: InteractionData

InteractionData


new InteractionData()

Holds all information related to an Interaction event

Source:

Members


global :Point

This point stores the global coords of where the touch/mouse event happened

Type:
  • Point
Source:

originalEvent :Event

When passed to an event handler, this will be the original DOM Event that was captured

Type:
  • Event
Source:

target :Sprite

The target Sprite that was interacted with

Type:
Source:

Methods


getLocalPosition(displayObject [, point] [, globalPos])

This will return the local coordinates of the specified displayObject for this InteractionData

Parameters:
Name Type Argument Description
displayObject DisplayObject

The DisplayObject that you would like the local coords off

point Point <optional>

A Point object in which to store the value, optional (otherwise will create a new point)

globalPos Point <optional>

A Point object containing your custom global coords, optional (otherwise will use the current global coords)

Source:
Returns:

A point containing the coordinates of the InteractionData position relative to the DisplayObject

Type
Point