次のような基本的な MXML セットアップがあるとします。
<Item id="parent">
<Frame>
<mx:Image/>
</Frame>
</Item>
Image 要素の属性を、親 Item の孫 (子の子) として参照するにはどうすればよいですか? getChildAt() への 2 つの呼び出しをデイジーチェーン接続してみました。
parent.getChildAt(0).getChildAt(0)
しかし、次のエラーが表示されます。
Error: Call to a possibly undefined method getChildAt through a reference with static type flash.display:DisplayObject.
孫要素を呼び出す適切な方法は何ですか?