AS3 Error 1144: Method Implemented with Incompatible Signature

882 views Asked by At

I'm working with the OSMF library REOPS [https://code.google.com/p/reops/]. Particularly the REOPS.zip project files. [https://code.google.com/p/reops/downloads/detail?name=REOPS.zip]

When trying to compile the RE_Skin_Compiled.fla, I receive the following error:

ClosedCaptionField.as, Line 14, Column 15 1144: Interface method get text in namespace com.realeyes.osmfplayer.controls:IClosedCaptionField is implemented with an incompatible signature in class com.realeyes.osmfplayer.controls:ClosedCaptionField.

This error is detailed by Adobe here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/compilerErrors.html

Which states:

Method signatures must match exactly.

There are only two methods in the IClosedCaptionField interface, and they do match what is implemented in the ClosedCaptionField class.

IClosedCaptionField.as

package com.realeyes.osmfplayer.controls
{
    import flash.text.TextFormat;

        public interface IClosedCaptionField extends ISkinElementBase
        {
                function get text():String;
                function set text(p_value:String):void;
        }
}

ClosedCaptionField.as

package com.realeyes.osmfplayer.controls
{
    import flash.text.TextField;
    import flash.text.TextFormat;

    /**
     * Displays captions for media in the control bar. Accepts HTML
     * text (limited by Flash HTML display). This component starts
     * out invisible, and must be manually made visible.
     *
     * @author  RealEyes Media
     * @version 1.0
     */
    public class ClosedCaptionField extends SkinElementBase implements IClosedCaptionField
    {
        public var cc_txt:TextField;

        public function ClosedCaptionField()
        {
            super();

            //start up hidden
            //this.visible = false;
            //text = "";
        }

        /**
         * text
         * The HTML text to display
         *
         * @return      String
         */
        public function get text():String
        {
            return cc_txt.htmlText;
        }

        public function set text(p_value:String):void
        {
            if (cc_txt)
            {
                cc_txt.htmlText = p_value;
            }
            trace("set cc text: " + p_value);
        }
    }
}

In the RE_Skin_compiled.fla Actionscript Settings, I have added the path to the REOPS\src\ folder, and it is able to find the classes when checking the properties on the AS Linkage.

enter image description here

enter image description here

Any ideas on what I might be missing in order to get the RE_Skin_Compiled.fla to correctly compile along with it's skin classes?

1

There are 1 answers

0
Derek On BEST ANSWER

In the RE_Skin_compiled.fla, there is an included [underscore]code[underscore] compiled clip object which was causing the issues with conflicting classes.

After deleting the [underscore]code[underscore] compiled clip, the fla compiled with the linked classes correctly.