Questions re porting my Flixel game to HaxeFlixel

  • Hi,

    Currently I'm facing problems converting all imports from original Flixel to HaxeFlixel and not sure how I should change them. I've converted my code from as3 to Haxe with as3hx tool.

    For example, what should

    import *.flixel.FlxRect;

    be? My best guess was based on documentation that FlxRect now lives in flixel.math but import flixel.math won't work.

  • This may have already been tested by you, since I can't exactly comprehend things right now, but did you try "import flixel.math.FlxRect" or "import flixel.math.*"?

  • @test84 You can search classes from here : from left panel :)

    We are making a MMORPG w/HaxeFlixel => Click Here to go to the Facebook Page


  • @KnotUntied I solved that but now faced a more serious one, FlxWeapon. I know it's in addons but import flixel.addons.*; doesn't help. Nor does import flixel.addons.FlxWeapon; or import flixel.addons.weapn.FlxWeapon;

    I don't understand it, isn't it in package flixel.addons.weapon?

  • @eminfedar Yes, problem is how to use them. See me anser to @KnotUntied .

  • @test84 You sure you did "import flixel.addons.weapon.FlxWeapon"?

  • @KnotUntied Yes, I just mentioned it in my previous reply. It returns:

    Type not found : flixel.addons.weapon.FlxWeapon

  • And yes I've installed flixel Addons.

  • How about "import flixel.addons.weapon.FlxTypedWeapon"?

    I checked the addons library's changelog, and apparently FlxWeapon was abstracted to FlxTypedWeapon.

  • Fixed it, had to add

    <haxelib name="flixel-addons" />

    to project.xml file.

  • I'm glad the problem's solved.

    ...and mine still isn't. weeps

Log in to reply