0
所以我定義的類名爲橢圓非常簡單的類:1067:橢圓型的值隱式強制給無關聯類型flash.display一:的DisplayObject
package {
import flash.display.MovieClip;
public class Ellipse extends MovieClip {
public function Ellipse() {
trace("HI")
}
}
}
然後我試圖將其添加到主時間軸使用:
var ellipse:Ellipse = new Ellipse()
addChild(ellipse);
但它口口聲聲說
Scene 1, Layer 'Layer 1', Frame 1, Line 3, Column 10 1067: Implicit coercion of a value of type Ellipse to an unrelated type flash.display:DisplayObject.