I have created a class:
package {
import flash.display.*;
import flash.events.*;
public class nD extends Sprite {
public function nD() {
addEventListener(Event.ADDED_TO_STAGE, addedToStage);
}
private function addedToStage(event:Event):void {
graphics.lineStyle(5, 0xff0000, 1);
graphics.moveTo(100, 200);
graphics.moveTo(100, 100);
}
}
}
I have messed around placing the lines in different places, but no lines show up on the SWF stage no matter what I do.
I am missing something important, but I never seem to stumble upon it. I have tried “this” as a prefix. I have drawn and addChild in different orders.
Can anyone help with ideas about creating a class:Sprite and then drawing on it?