String Avoider Starling prototype using Starling-Extension-Graphics library and Flash graphic API methods

One of the things I was missing the most in Starling framework is I can’t access to AS3 graphic API. I wanted do do a quick port of Stringy game but since it’s mostly based upon graphic API, it seemed impossible… I wasn’t satisfied of my iPhone String Avoider prototype with Adobe Flash Professional CS5.5 so I dropped the project until I found Starling-Extension-Graphics which adds a suite of graphics primitives such as Planes, Fills and Strokes.

With this awesome library I was finally able to make a decent port of the string avoider prototype, have a look:

Main class:

Game class:

And this is the result, running at 60fps:

Click and drag the mouse to animate the string. It runs at 60fps smoothly, so tomorrow I am porting it to my iPad and will show you both the source code and the result.

Download the source code with all needed libraries

  • MC

    I would like to see different prototypes instead of the same prototype ported to different libraries unless you’re making a comparation between libraries

  • Very nice tutorial Emanuele, I am very much into Starling these days and I didn’t know you can get such excellent results with the graphics API extension. Thanks for sharing this!

  • Carlos Ribeiro

    Great tutorial.

  • Jacob

    Hi,

    Very useful, thanks for sharing.
    I’m getting some error on the line 15 of your code: Type was not found or was not compile-time constant: Shape
    Could you hint where is the issue.
    Thanks in advance.