Hello,
I am trying to make my first as3 class based game and so i was wondering if i could get some help. although the game wont have fancy graphics, i just would like to understand the way it works…currently, i am at a point where im getting :
1067: Implicit coercion of a value of type flash.display:Stage to an unrelated type Stage.
in my main file robot.fla, im using
var robo:robot=new robot(stage);
//var starenemy:enemy1=new enemy1(this.stage);
addChild(robo);
inside that robot.as
…
public class robot extends Sprite {
import flash.display.Stage;
private var _stage:Stage;
…
public function robot(stageRef:Stage):void {
_stage = stageRef;
…
}
amongst other things and i cant reference anything from the stage.
I think im going nuts trying to figure out how to correctly reference things to the stage. so can you take a look and guide me and tell me how i can proceed?
Attached is the zip file
Thanks