Invalid Bitmap Data

I have some code where I"m using FlxSprite’s loadGraphic method. I’m passing in the path to the file I want to load. When I debug through the code and look at the sprite after i’ve loaded the graphic, I can see that it has the correct width and height.

But, in the end, when it is attempted to be drawn to the screen, I get an error that says
[Fault] exception, information=ArgumentError: Error #2015: Invalid BitmapData.

I"m very confused because this file used to work and when I try any bitmap for anything, none of them ever work, I always get that error.

Like I said, as I debug through the code, I can see its picked up the image correctly, or so it seems, so this leaves me very confused.

This happens when I debug in flash, when I try any other platform, nothing works :frowning:

Of course, after spending a couple hours on this, I figure it out a few minutes after making a post. I was using the constructor for my state and not the create method.

1 Like