An acrionscript 3.0 class that lets you easily insert a parallax star field backrgound to your game, banner or any other flash project.
Easily set and change background color, star color, scroll speed, position, size.
Defaults to run on an ENTER _FRAME event but can be set to a timer by setting useTimer to true.
You simply import the StarScroll.as class, add it to the stage and call the startScroll method.
Download file includes 3 examples of how to use the StarScroll class, including the above demo.
StarScroll.as extends the Bitmap class and uses bitmap data to draw the stars. This keeps the file size of your compiled swf down, and is extremely efficient, freeing up resources for the rest of your project while having a really nice looking effect running in the background.
The file size of a 550×400 swf with 1000 stars is just 2.5kb
You can add 1000s of stars before noticing any drop in frame rate, so this is effectively a parallax star particle system.
The included demo .fla files require Flash CS4 or higher. However you do not need to use the Flash IDE to use the starfield background. Can be used with FLEX /FlashDevelop etc.