Flixel Power Tools FlxScrollingText
It seemed only natural to take the FlxBitmapFont and the FlxScrollZone tools and combine them – and this is the result! You can create a scrolling text field with one line of code. Pass it an FlxBitmapFont, give it a Rectangle in which to scroll and away it goes. You have control over the scroll speed, steps, the text that is scrolled (which can be updated in real-time), set the scroller to wrap or destroy itself once finished and only scroll if visible in an active camera.
// Create an FlxBitmapFont in the usual way
font = new FlxBitmapFont(AssetsRegistry.bluepinkFontPNG, 32, 32, FlxBitmapFont.TEXT_SET2, 10);
// Then create a scrolling text using it - this is just an FlxSprite, you can move it around, collide with it, all the things you can do with a sprite
scroller = FlxScrollingText.add(font, new Rectangle(14, 40, 292, 32), 1, 0, "WELCOME! ");
Recent Flixel Power Tool Posts
- Flixel Power Tools v1.9 Released
- Flixel Power Tools v1.8 Released - Let's get clicky
- Flixel Power Tools v1.7 - Kaboom!
- Flixel Power Tools v1.6 released including FlxControl
- Flixel Power Tools v1.5 - A monster of an update!
- FlxScreenGrab and FlxScrollZone added to Flixel Power Tools
- Flixel Power Tools v1.3 - Now Flixel 2.5 compatible!
- FlxHealthBar added to Flixel Power Tools
Make yourself heard
All about Photon Storm and our
HTML5 game development services
Filter our Content
- Cool Links
- Flash Game Dev Tips
- Game Development
- Geek Shopping
- In the Media
- Phaser 3