I am making a game and I want to remove all that I dont need from a class:
I just need:
addEventListener
removeEventListener
dispatchEvent
graphics
x
y
package
{
import flash.display.Graphics;
import flash.display.Stage;
import flash.events.EventDispatcher;
public class MinUnit extends EventDispatcher
{
public var graphics:Graphics;
public var stage:Stage;
public var x:Number;
public var y:Number;
public function MinUnit()
{
graphics.beginFill(0xFF0000);
graphics.drawRect(-1, -1, 2, 2);
graphics.endFill();
stage = root;
x = Math.random() * stage.stageWidth;
y = Math.random() * stage.stageHeight;
}
}
}
but I dont know how to make it work?
what am I doing wrong or what is missing?
thanks