If you need a tiled bitmap, you can use RectangleSkin
(or any other graphics shape skin) with FillStyle.Bitmap()
. Just set the repeat
argument to true
.
If you just want to stretch the bitmap to fill the available space (possibly while maintaining aspect ratio), then AssetLoader
would be a good option too. You must load the bitmap from the Assets
class or a URL, though. You can't pass arbitrary BitmapData
to AssetLoader
. So that might be a limitation, in certain situations.
I've been thinking about creating some kind of BitmapSkin
class that is basically just a Bitmap
, but it switches between different BitmapData
when its parent component changes states (like a button's up, down, hover, etc. states). If that's something you'd be interested in, let me know.