4 Replies Latest reply on Sep 10, 2011 5:14 PM by Francisc

    Using a BitmapImage in a mobile skin

    drkstr_1 Level 4



      Is there a way to use a BitmapImage as a skin part in a mobile skin? Since it does not inherit from DisplayObject, I cannot add it using the addChild method in the skin.


      I tried the following:


      override protected function createChildren():void
           this.imageDisplay = new BitmapImage();


      But I get:


      TypeError: Error #1009: Cannot access a property or method of a null object reference.

           at mx.core::UIComponent/addChild()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\core\UI Component.as:7137]


      ...as it appeards displayObject is null at this point.


      Any ideas?