Test-drive the Demo

Start up the following sample project to find out if your system is equipped with a recent enough Flash Player, and to get a feeling of what can be accomplished with Starling. The complete source code of this project can be found in the folder "samples/demo" of the download package.

Start Starling Demo

Prepare your IDE

You can use any Flash IDE to develop with Starling. Below is a list of the most popular ones!
After picking one, we recommend to update to the latest AIR SDK, as well.

Create your Game

Once your IDE is set up correctly, it's extremely easy to get going with Starling. Link your project to the Starling SWC library and use the following startup class:

import flash.display.Sprite;
import starling.core.Starling;

[SWF(width="400", height="300", frameRate="60", backgroundColor="#ffffff")]
public class Startup extends Sprite
    private var _starling:Starling;

    public function Startup()
        _starling = new Starling(Game, stage);

This will initiate a Starling instance and start it up. The "Game" parameter of the constructor expects a class that is a Starling display object. This is your portal into the GPU accelerated world: Starling has its own set of display objects. In their usage, they are almost identical to conventional display objects; behind the scenes, however, they use Stage3D to render content on the screen.

import starling.display.Sprite;
import starling.text.TextField;

public class Game extends Sprite
    public function Game()
        var textField:TextField = new TextField(400, 300, "Welcome to Starling!");

The biggest "gotcha" in Starling is to use the right classes. Your IDE's autocompletion will default to the "flash.display" classes, while you want classes within "starling.display". When something goes wrong, always check the package imports above your class: you're probably using the wrong package.

Use the correct Rendering Mode

When you embed the compiled SWF movie in a browser, you have to pass an additional parameter to enable Stage3D rendering. The same holds true for AIR's configuration XML.

  • HTML: in the object tag, add the parameter <param value='direct' name='wmode'>
  • HTML: in the embed tag, add the attribute wmode='direct'
  • AIR: change the render mode: <renderMode>direct</renderMode>

Get More Information

We (and many experienced Starling users) have come up with tons of documentary text for you to read. If you get stuck with your new game project, check the help section for further advice: