Starling is popular pure ActionScript 3 framework which provides a lot of features for creating 2D games or any other graphical applications. We've decided to use this framework in our game as a primary game engine. While creating stopwatch component which uses starling.text.TextField class for rendering text we've faced with performance issue and memory leaks. Issue was resolved by creating new starling.text.TextField instance each time we need to render new time. Sounds strange, but this approach works much faster (without any memory leaks) than just updating text property of existing starling.text.TextField instance. Below describes step-by-step flow which we've discovered during stopwatch component implementation.
Showing posts with label TextField. Show all posts
Showing posts with label TextField. Show all posts
Friday, June 1, 2012
Monday, May 28, 2012
Text Input with Starling framework
Starling is a popular pure ActionScript 3 framework for Adobe Flash with a lot of features. It's an open source library, so you can download ans use it right away. Starling runs not only in the browser but on all major mobile platforms, like iOS and Android.
The Starling framework allows you to create hardware accelerated applications in Flash. The main target is the creation of 2D games, but Starling can be used for any graphical application.
Starling's API is very similar to the native Flash API what is very beneficial. It provides almost the same set of classes and functions, which makes it easy for experienced Flash developers to make the transition from the conventional display list to stage3D accelerated content.
Unfortunatly for today not all components are covered in Starling framework. Like Text Input component is not part of this framework. But we can still create a classic TextField and put it on top of Starling.
The Starling framework allows you to create hardware accelerated applications in Flash. The main target is the creation of 2D games, but Starling can be used for any graphical application.
Starling's API is very similar to the native Flash API what is very beneficial. It provides almost the same set of classes and functions, which makes it easy for experienced Flash developers to make the transition from the conventional display list to stage3D accelerated content.
Unfortunatly for today not all components are covered in Starling framework. Like Text Input component is not part of this framework. But we can still create a classic TextField and put it on top of Starling.