So, how to draw a mask on top of a FlxGradient FlxSprite? 1. First, if you don't have a mask already create a temporary variable to hold your mask, for example, like this:
var tempMask = new FlxSprite(100, 100);
tempMask.makeGraphic(100, 100, FlxColor.TRANSPARENT,true);
2. Second, Draw whatever shape you want on top of it, for example, like this:
FlxSpriteUtil.drawRoundRect(tempMask, 0, 0, 50, 50, 10, 10, FlxColor.WHITE);
3. Third, use the mask to "erase" specific parts of your original sprite (I'm adding the FlxGradient FlxSprite here already, as an example):
FlxSpriteUtil.alphaMaskFlxSprite(FlxGradient.createGradientFlxSprite(100,100,[FlxColor.LIME, FlxColor.RED, FlxColor.WHITE], 1, 90, true), tempMask, yourSprite);
4. Just make sure your original FlxSprite (in this case, the FlxGradient's) and your mask Sprite (tempMask) have the same size bitmapData (in this case, 100X100px).