Problems with AS3 code for simple button

I am trying out some code, which is supposed to produce a simple button with an over, upstate and downstate, but I only get a blank white canvas when playing the swf. I have the code added to frame 1 of the timeline. I am guessing I am doing something wrong, but don’t get any errors.



 /*the over state will be red, this will show when the user hovers over a button*/
var overSprite:Sprite = new Sprite();
overSprite.graphics.beginFill(0xff0000, 1);
overSprite.graphics.drawRect(0, 0, 100, 100);
overSprite.graphics.endFill();
/* the upstate will be green. This will show when the user is not interacting with the button*/
var upSprite:Sprite= new Sprite();
upSprite.graphics.beginFill(0x00ff00, 1);
upSprite.graphics.drawRect(0, 0, 100, 100);
upSprite.graphics.endFill();
/*This is the downstate sprite which will show when the user clicks on a button*/
var downSprite:Sprite=new Sprite();
downSprite.graphics.beginFill(0xffffff, 1);
downSprite.graphics.drawRect(0, 0, 100, 100);
downSprite.graphics.endFill();
/*now we just pass the sprites into the SimpleButton so that it has all of its states immediately, the last paremeter describes the hittest state, that is the area that can be moused over or clicked on */
var btnOne:SimpleButton = new SimpleButton(upSprite, overSprite, downSprite, overSprite);