These may be obvious/not useful.
1) Tryhaxe is a website that compiles have code online. It is good for making code that helps people on forums, as you can quickly test if it compiles.
2) Extending classes allows for extended behaviour. FlxSprite is obvious, but everything from animations, the weapons class, and the effects class can all be extended.
3) Polymorphism allows for you to have a base item class and then all of your classes can extend from that. You can store these classes in a FlxGroup of your item class.
3) When a class expects you to give a callback that has no arguments, but you want to pass arguments to that class, give it an anonymous function with a function call inside.
For example, the FlxButton stupidly wants to call a function with no arguments. But what if there are 5 buttons, in a shop, to buy different items? Well of course you don't want a buyTrophy, buyGem, buyDiamond.... method, you just want one method that takes an argument of the item. But flxButton doesn't want an item! What do you do?
callback = function() { buyItem(trophy); }
//Next button...
callback = function() { buyItem(diamond); }
Now you only need one buy method!
4) Callbacks are surprisingly your friend.
5) If you are doing something expensive in your update method (like I was, resetting large inventories every frame) that is setting something else to a variable. Like a labels text to a variable, instead of setting it every frame, make a method that is automatically called when ever a certain variable is changes. Shown below (Pseudo code, won't compile)
//Before, bad.
score:FlxText
myScore:Int (get,set)miscode)= 900000;
update(){
score.text = myScore;
}
//After, good.
score:FlxText
myScore:Int = 900000;
update(){
//Nothing
}
function set_myscore(newScore:Int){
score.text=newScore;
}
Hope these were useful. A lot of these were learnt when making an inventory like one in terror or minecraft in haxeflixel.
These might be obvious too you, but maybe not others.
Edit: I kind of rushed this, if you don't understand anything, post.