Trace an objects width?

This is an easy question but don’t understand why this isn’t working. I’m trying to trace the width property of a shape object. do i have to convert it to a number? could someone please explain how to do this?

var whiteBG:Shape;

whiteBG = new Shape();
whiteBG.graphics.lineStyle(0,0xffffff);
whiteBG.graphics.beginFill(0x00ffff);
whiteBG.graphics.drawRect(-1000, -1000, 3000, 3000);
whiteBG.graphics.endFill();
addChild(whiteBG);

trace(whiteBG.width);

Error: 1120 Access of undefined property whiteBG.

What am I doing wrong?

Thanks