The syntax for overriding built-in classes

Having trouble overriding the transform() method in StyleSheet - it could be done in AS2.0 and AS3.0 help says it can be done, but I’m getting a compile error telling me it’s not marked for override and it’s an incompatible override.

Have I got something syntactically wrong here:


package
{
    import flash.text.*;
    
    public class StyleSheetEx extends flash.text.StyleSheet
    {
        // override the transform method
        function transform(style:Object):TextFormat
        {
            
        ...