我正在使用OSMF庫REOPS [https://code.google.com/p/reops/]。特別是REOPS.zip項目文件。 [https://code.google.com/p/reops/downloads/detail?name=REOPS.zip]AS3錯誤1144:使用不兼容簽名實現的方法
當試圖編譯RE_Skin_Compiled.fla,我收到以下錯誤:
ClosedCaptionField.as,14號線,15列1144:接口的方法獲取文本中的命名空間com.realeyes.osmfplayer.controls: IClosedCaptionField在類com.realeyes.osmfplayer.controls:ClosedCaptionField中使用不兼容的簽名來實現。
此錯誤是由Adobe在這裏詳述:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/compilerErrors.html
其中規定:
Method signatures must match exactly.
只有兩個在IClosedCaptionField接口方法,並且它們匹配什麼是在ClosedCaptionField類中實現。
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);
}
}
}
在RE_Skin_compiled.fla ActionScript設置,我已經加入了路徑REOPS的\ src \文件夾,它能夠在檢查AS連接上的屬性時找到類。
什麼我可能會爲了獲得RE_Skin_Compiled.fla與它的外觀類正確編譯一起失蹤的任何想法?