Packagecc.cote.airbag
Classpublic class AirBagEvent
InheritanceAirBagEvent Inheritance flash.events.Event

Since : 1.0a rev1

An AirBagEvent object is dispatched by the AirBag object when it performs its collision detection routine on ENTER_FRAME. Please note that this object inherits properties and methods from flash.events.Event. You will have to look up ActionScript's API documentation for those inherited elements.

See also

cc.cote.airbag.AirBag
cc.cote.airbag.Collision
ActionScript's Event Class Reference


Public Properties
 PropertyDefined By
  collisions : Vector.<Collision>
[read-only] A vector of Collision objects representing each collision detected.
AirBagEvent
Public Methods
 MethodDefined By
  
AirBagEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, collisions:Vector.<Collision> = null)
Creates a new AirBagEvent object.
AirBagEvent
Public Constants
 ConstantDefined By
  COLLISION : String = collision
[static] The COLLISION constant defines the value of the type property of a collision event object.
AirBagEvent
  DETECTION : String = detection
[static] The DETECTION constant defines the value of the type property of a detection event object.
AirBagEvent
Property Detail
collisionsproperty
collisions:Vector.<Collision>  [read-only]

A vector of Collision objects representing each collision detected.


Implementation
    public function get collisions():Vector.<Collision>
Constructor Detail
AirBagEvent()Constructor
public function AirBagEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false, collisions:Vector.<Collision> = null)

Creates a new AirBagEvent object. AirBagEvent is, basically, a standard flash.events.Event with the simple addition of the collisions property which holds a Vector of Collision objects (if appropriate).

Parameters
type:String — Type of the event. Can be AirBagEvent.COLLISION or AirBagEvent.DETECTION.
 
bubbles:Boolean (default = false) — Determines whether the Event object participates in the bubbling phase of the event flow.
 
cancelable:Boolean (default = false) — Determines whether the Event object can be canceled.
 
collisions:Vector.<Collision> (default = null) — A Vector of Collision objects for each detected collisions.
Constant Detail
COLLISIONConstant
public static const COLLISION:String = collision

The COLLISION constant defines the value of the type property of a collision event object.

DETECTIONConstant 
public static const DETECTION:String = detection

The DETECTION constant defines the value of the type property of a detection event object.