Wednesday, March 18, 2009

D is for Dynamic Classes

ActionScript allows classes to be defined as dynamic. A dynamic class can have public properties and functions attached to it at runtime.
   public dynamic class DynamicClass
{
public DynamicClass()
{

}
}
Note the dynamic keyword used in the class declaration. So even though DynamicClass has not properties or functions defined (besides those of its super-class, Object), we can still attach properties and functions to it dynamically.

Learn more about ActionScript Dyanmic Classes at Flex After Dark...