Skip to content

Instantly share code, notes, and snippets.

@tienery
Last active December 31, 2015 02:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tienery/b42c47387fce8f56a2a4 to your computer and use it in GitHub Desktop.
Save tienery/b42c47387fce8f56a2a4 to your computer and use it in GitHub Desktop.
Choices unable to render the background image
private function redraw()
{
....
if (baseImgSrc != null)
{
_bmp.bitmapData = Assets.getBitmapData(_baseImgSrc);
_bmp.visible = true;
_bmp.width = totalWidth + (padding * 2);
_bmp.height = totalHeight + (padding * 2);
}
else
{
_bmp.visible = false;
graphics.beginFill(backColor);
graphics.drawRect(0, 0, totalWidth + (padding * 2), totalHeight + (padding * 2));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment