function listener(e:Event):void {
var m:MovieClip=e.target as MovieClip;
m.x++;
}
If such a listener is attached to an object that's not a MovieClip
descendant (for example, a Sprite
), the typecast will fail, and any subsequent operations with its result will throw the 1009 error.