Hey, thank you for your reply 🙂
First, that was my guess also, and then as now the error is gone but I don't see anything on my screen. I get the trace action on the addedEvent but no stats on scene, no error.
package
{
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import starling.core.Starling;
[SWF(width="960", height="640", frameRate="60", backgroundColor="0xffffff")]
public class Main extends Sprite
{
public function Main()
{
addEventListener(Event.ADDED_TO_STAGE, addedHandler);
}
protected function addedHandler(event:Event):void
{
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
var s:Starling = new Starling(MainGame, stage);
s.antiAliasing = 1;
s.start();
}
}
}
And here is my MainGame.as class:
package
{
import fr.kouma.starling.utils.Stats;
import starling.display.Sprite;
import starling.events.Event;
public class MainGame extends Sprite
{
public function MainGame()
{
addEventListener(Event.ADDED_TO_STAGE, addedHandler);
}
private function addedHandler(e:Event):void
{
trace("added.");
addChild(new Stats());
}
}
}
Again, no errors on compiling but no stats on scene!
Thank you guys for your time!