Add method to an existing AS3 class

Does any one now how I might go about adding a method to flash.display.Graphics so that I can call it just like I would “drawRect()”

for example, “graphics.drawDottedRect()”

I tried extending Graphics with a new class called Graphics and adding my function but this does not work.
I’m sure that the display object is making its graphics instance from the real flash.display.Graphics class and not my extended class.

Any help would be appreciated.

Thanks