0

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?

4

1 回答 1

0

在 RE_Skin_compiled.fla 中,有一个包含的 [underscore]code[underscore] 编译剪辑对象,它导致了类冲突的问题。

删除 [underscore]code[underscore] 编译剪辑后,fla 与链接的类正确编译。

于 2013-08-21T16:48:44.533 回答