Demos of Starling Framework.
- You can see all demos in one application based on XFace.
- You can view all source code in one project code base and edit it for trying easily.
- You can add your demos or code pieces for studying easily too.
- Add “-swf-version=13” to your Compiler Arguments.
- Run “bin/HelloStarling.html” instead of “bin/HelloStarling.swf”.
- Official demos
- Demos from James Li
package starling_demos { public class YourDemo extends StarlingDemoBase { [Test] public function test():void { // Your demo code here. } } }
StarlingDemoBase
injected an Starling instance and root container for you, you can free your demo class from extending it by injecting them yourself if needed.
package starling_demos { import starling.core.Starling; import starling.display.DisplayObject; import starling.display.DisplayObjectContainer; public class StarlingDemoBase { [Inject] public var root:DisplayObjectContainer; [Inject] public var starling:Starling; protected function display(child:DisplayObject, x:Number = 0, y:Number = 0):void { child.x = x; child.y = y; root.addChild(child); } } }
package starling_demos { import starling_demos.jamesli.JamesliDemos; import starling_demos.official.OfficialDemos; [Suite] public class AllStarlingDemos { public static function suite():Array { return [ YourDemo, JamesliDemos, OfficialDemos, ]; } } }