Flixel Power Tools FlxDisplay

Back to the Flixel Power Tools

Contains functions that help with the display of sprites. Includes:

  • Alpha Masks – Blend two images together, or cut holes into sprites with alpha channels
  • Screen Wrap – Make sure a sprite stays within the boundary of a screen
  • Space – Space a group of sprites out an equal distance apart from each other
  • Screen Center – A quick way to center a sprite on the screen horizontally, vertically or both

Screen Shot

Code Example


//	The picture
picture = new FlxSprite(0, 0, AssetsRegistry.acrylBladeRunnerPNG);
			
//	The mask
mask = new FlxSprite(0, 0, AssetsRegistry.alphaMaskPNG);
			
//	The final display
output = new FlxSprite(0, 22);
			
FlxDisplay.alphaMaskFlxSprite(picture, mask, output);

Recent Flixel Power Tool Posts

  1. Flixel Power Tools v1.9 Released
  2. Flixel Power Tools v1.8 Released - Let's get clicky
  3. Flixel Power Tools v1.7 - Kaboom!
  4. Flixel Power Tools v1.6 released including FlxControl
  5. Flixel Power Tools v1.5 - A monster of an update!
  6. FlxScreenGrab and FlxScrollZone added to Flixel Power Tools
  7. Flixel Power Tools v1.3 - Now Flixel 2.5 compatible!
  8. FlxHealthBar added to Flixel Power Tools

One Response

Leave a comment

Make yourself heard