I’m getting this error:-
Error:(12, -1) Defined in this class
and the full code is:-
import feathers.system.DeviceCapabilities;
import openfl.display.MovieClip;
import openfl.display.StageAlign;
import openfl.display.StageScaleMode;
import openfl.events.Event;
import openfl.geom.Rectangle;
//import openfl.ui.ContextMenu;
import starling.core.Starling;
@:meta(SWF(width="960",height="640",frameRate="60",backgroundColor="#4a4137"))
class HelloWorldWeb extends MovieClip
{
public function new()
{
super();
// var menu : ContextMenu = new ContextMenu();
// menu.hideBuiltInItems();
// this.contextMenu = menu;
if (this._starling.stage != null)
{
this.stage.align = StageAlign.TOP_LEFT;
this.stage.scaleMode = StageScaleMode.NO_SCALE;
}
this.loaderInfo.addEventListener(Event.COMPLETE, loaderInfo_completeHandler);
}
private var _starling : Starling;
private function start() : Void
{
this.gotoAndStop(2);
this.graphics.clear();
//simulating iPhone Retina
DeviceCapabilities.dpi = 326;
Starling.multitouchEnabled = true;
// var MainType : Class<Dynamic> = Type.getClass(Type.resolveClass("feathers.examples.helloWorld.Main"));
var MainType : Class<Dynamic> = feathers.examples.helloWorld.Main;
this._starling = new Starling(MainType, this.stage, new Rectangle(0, 0, 960, 640));
this._starling.supportHighResolutions = true;
this._starling.skipUnchangedFrames = true;
this._starling.stage.stageWidth = 480;
this._starling.stage.stageHeight = 320;
this._starling.start();
}
private function loaderInfo_completeHandler(event : Event) : Void
{
this.start();
}
}
Line 12 is:-
class HelloWorldWeb extends MovieClip
What is the compiler complaining about?
I’m compiling with openFl and targeting HTML5.