StarlingMVC is an IOC framework for use in games built using Starling. Closely modelled after established IOC frameworks like Swiz and RobotLegs, StarlingMVC features:

  • Dependency Injection(DI)/Inversion of Control(IOC)
  • View Mediation
  • Event Handling
  • Stays out of the way of your Starling game code
  • Simple configuration
  • Easily extended
  • More utilities to help with your game code


package com.mygame.views
    import com.creativebottle.starlingmvc.StarlingMVC;
    import com.creativebottle.starlingmvc.config.StarlingMVCConfig;
    import com.creativebottle.starlingmvc.views.ViewManager;
    import com.mygame.models.GameModel;

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

    public class GameMain extends Sprite
        private var starlingMVC:StarlingMVC;

        public function GameMain()
            var config:StarlingMVCConfig = new StarlingMVCConfig();
            config.eventPackages = [""];
            config.viewPackages = ["com.mygame.views"];

            var beans:Array = [new GameModel(), new ViewManager(this)];

            starlingMVC = new StarlingMVC(this, config, beans);
Frameworks . URL.