Overwriting a FlxNapeSprite's bitmapdata



  • I trying to change the graphics of a FlxNapeSprite by using the bitmapdata of two different FlxGraphic variables, but running this two times (second time == original state) makes the game crash, why? Interestingly, if I create a completely new bitmapdata every time, it works without any problems...

    if (state == STATE_SMALL) 
    {
        body.scaleShapes(.25, .25);
        this.pixels = circleGfxSmall.bitmap;
    }
    else
    {
        body.scaleShapes(4, 4);
        this.pixels = circleGfxBig.bitmap;
    }
    

Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.