Error #1034: Type Coercion failed:cannot convert .... to flash.display.DisplayObject

I’m trying some code I got from the web and I receive the above error from the following for the library item warning_icon:

var mySkin:AdvAlertSkin = new AdvAlertSkin();
mySkin.addContent(warning_icon, new Point(5, 40));

Since warning_icon wasn’t provided, I provided an appropriate 32x32 bitmap. AdvAlertSkin.addContent is below:

public function addContent(object:Class, position:Point):void  
        dynamicContent.push({obj:object, pos:position});

What do I need to do to make this work?