 import flash.system.LoaderContext;
 import flash.utils.ByteArray;
 
+import mx.core.IInvalidating;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.graphics.BitmapFillMode;

            // for example that we do not receive further load related events
            // our previous content before we can consider the new source.
            clearLoadingContent();
            
            _source = value;
            sourceInvalid = true;

        setBitmapData(null); 
        loadFailed = true;
    }
    
    /**
     *  @private
     *  Used for deferral of bitmap capture when an assigned source 
     *  has yet to be added to the stage. 
     */
    private function source_addedToStageHandler(event:Event):void
    {
        removeAddedToStageHandler(event.target);
        applySource();
    }
    
    /**
     *  @private
     */
    private function removeAddedToStageHandler(target:Object):void
    {
        if (target && target is DisplayObject)
            target.removeEventListener(Event.ADDED_TO_STAGE, source_addedToStageHandler);
    }
}  
}
