ActionScript 3 Understanding the "Error 1009: Cannot access a property or method of a null object reference" Uninstantiated object


Example

var a:Object;
trace(a); // null
trace(a.b); // Error 1009

Here, an object reference is declared, but is never assigned a value, be it with new or assignment of a non-null value. Requesting its properties or method results in a 1009 error.