解決:
同じ問題が発生した場合は、addChild()ではなくaddElement()が問題を解決しました。
mxmlからactionsctiptに移行しようとしています。プロパティを<s:Rect>
作成して設定したものがありますが、追加に問題があります。
var aRect:Rect = new Rect();
//set properties like aRect.x, aRect.y, aRect.width, aRect.height
//tried adding it various ways
addChild(aRect);
Application.addChild(aRect);
Application.application.addChild(aRect);
stage.addChild(aRect);
しかし、私はエラー 1067を受け取り続けます:タイプspark.primitives:Rectの値の暗黙の強制は無関係のタイプflash.display:DisplayObjectになります
元々はmxmlにありましたが、内部に<s:Application>
ネストされておらず、内部にありました。
<s:Application>
<s:Rect id="aRect" x="10" y="10" width="15%" height="15%">
//then fill code here, removed for readability
</s:Rect>
</s:Application>
どうしたのか、actionscriptはmxmlよりも優れていると思いました。