i just wanted to create a class reference from another class
i have 2 clss where i want to create a instace of class Helicopter in class Engine and then control the helicopter instaces properties from the helicopter class
Engine class
package com.asgamer.helicopter
{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
public class Engine extends MovieClip
{
public static var heli:Helicopter= new Helicopter();
public function Engine() : void
{
this.stage.addChild(heli);
}
}
}
then helicopter class
package com.asgamer.helicopter{
import flash.display.MovieClip;
import flash.events.Event;
import flash.events.KeyboardEvent;
import flash.ui.Keyboard;
public class Helicopter extends MovieClip {
public var up:Boolean = false;
public var down:Boolean = false;
public var left:Boolean = false;
public var right:Boolean = false;
public function Helicopter() {
heli.x=200;
heli.y=200;
}
}
}