FlxNestedSprite not working

  • I'm trying to use FlxNestedSprite in my program, but I'm encountering some problems. The first is just a minor annoyance as far as I know, but the second is making my game crash. I have a class that extends FlxNestedSprite, and I'm trying to add a child to it.

    My first problem is that when I try to import FlxNestedSprite, a problem displays under the problems tab. I use the line "import flixel.addons.display.FlxNestedSprite;" and the error message it gives me is: "Type not found: flixel.addons.display.FlxNestedSprite" My code still compiles, but I'd like to know if there's a way to get rid of this error message.

    My second problem is that when I add a child to my object, my program crashes immediately upon starting. I'm using the following code (in new()):

    _tire.makeGraphic(10, 5, FlxColor.BLACK);
    _tire.x = 2;
    _tire.y = 2;

    The program crashes when I add the last line. Does anyone know how to fix this? Thanks.

  • do you have <haxelib name="flixel-addons" /> enabled in project.xml?

  • @galoyo Yes, I have that line in project.xml.

  • I don't think collision works for flxnestedsprite.

Log in to reply

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