Simple MovieClip Instantiate.. Help me stay sane!

Hi there, I posted on here yesterday but am still unable to perform this basic operation in as3, and its driving me crazy, maybe you can help!

I’ve got this code in an AS file in the same folder as my FLA -


package {
    
    import flash.display.MovieClip;
    import flash.text.TextField;    
    
    public class Mybtn extends MovieClip{
  
    public function Mybtn(xPos:int, yPos:int, n:String){
        var theButton : MovieClip = new MovieClip();
        this.addChild(theButton);
        this.x=xPos;
        this.y=yPos;
        this.name=n;
        trace("it lives!");
     }
    }
}

And a MovieClip in my library with the linkage ‘theButton’ and base class ‘flash.display.MovieClip’.

I’ve then put in the first frame of my FLA, the following -


var buttonOne = new Mybtn(50,50, "My First Freakin Button");

Yet still no movie on the stage! I’ve cut down my code and the amount of info from what I posted yesterday and I’m sure this should work… I basically want to create a method i can call that’ll instantiate a movieclip (which is my interface’s button) and be able to pass arguments regarding positioning, and also a string in order to fill in a dynamic text field inside the MC. PLEASE HELP!

Thanks for your time,

        Will