Classpublic dynamic class DynamicEvent
InheritanceDynamicEvent Inheritance

This subclass of Event is dynamic, meaning that you can set arbitrary event properties on its instances at runtime.

By contrast, Event and its other subclasses are non-dynamic, meaning that you can only set properties that are declared in those classes. When prototyping an application, using a DynamicEvent can be easier because you don't have to write an Event subclass to declare the properties in advance. However, you should eventually eliminate your DynamicEvents and write Event subclasses because these are faster and safer. A DynamicEvent is so flexible that the compiler can't help you catch your error when you set the wrong property or assign it a value of an incorrect type.


  var event:DynamicEvent = new DynamicEvent("credentialsChanged"); = name;
  event.passsword = password; // misspelling won't be caught!

Public Methods
 MethodDefined by
DynamicEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)
Constructor detail
public function DynamicEvent(type:String, bubbles:Boolean = false, cancelable:Boolean = false)


type:String — The event type; indicates the action that caused the event.
bubbles:Boolean (default = false) — Specifies whether the event can bubble up the display list hierarchy.
cancelable:Boolean (default = false) — Specifies whether the behavior associated with the event can be prevented.