I am creating a game in HaxeFlixel, using flixel-ui to deal with the user interface. I have run into a problem using the FlxUI9SliceSprite
. I have the following line of code to construct it:
_bg = new FlxUI9SliceSprite(0, 0, "assets/images/panel_bg.png", new Rectangle(0, 0, 280, 50), [8, 8, 16, 16]);
However, this does not work. I believe the problem is with the Graphic
parameter "assets/images/panel_bg.png"
, as using null
(which causes it to use a default graphic) works just fine.
When putting a try-catch around it, I got the following error message:
ArgumentError: Error #2015