New weirdness for an AS3 coder :(

Hi, here is another thing that I don’t get. Lets say I have this class


class GoOnStageDamnYou extends MovieClip
{
    public static var symbolName:String = "__Packages.GoOnStageDamnYou";
    private static var symbolOwner:Function = GoOnStageDamnYou;
    private static var symbolLinked = Object.registerClass(symbolName, symbolOwner);
    
    public function GoOnStageDamnYou() 
    {
        this.beginFill(0x00ff00);
        this.moveTo(0, 0);
        this.lineTo(30, 0);
        this.lineTo(30, 30);
        this.lineTo(0, 30);
        this.lineTo(0, 0);
        this.endFill();
    }
}

How can I instanciate it first and then put it on stage… I tried different things but it won’t draw itself.

If I try this nothing happens:


this.attachMovie(GoOnStageDamnYou.symbolName, "test", this.getNextHighestDepth());

Please help, I’m getting frustrated :slight_smile: