【发布时间】:2014-03-22 14:49:18
【问题描述】:
我有一个容器
<s:Group visible="true" x="100" y="0" width="582" height="300"
id="debugGroup" name="debugGroupName" >
<comps:circle id="rect2" />
<s:Rect width="100" height="100">
<s:fill><s:SolidColor /></s:fill>
</s:Rect>
</s:Group>
到目前为止,我从我的其他班级访问它是这样的:
FlexGlobals.topLevelApplication.debugGroup.addElement(comp_green_new_component);
我想滚动我的 debugGroup 容器,所以我添加了一个 Scroller。
<s:Scroller width="100%" height="100%" id="scrollerDebug">
<s:Group visible="true" x="100" y="0" width="582" height="300"
id="debugGroup" name="debugGroupName" >
<comps:circle id="rect1" />
<comps:circle id="rect2" />
<s:Rect width="100" height="100">
<s:fill><s:SolidColor /></s:fill>
</s:Rect>
</s:Group>
</s:Scroller
现在我无法像这样从其他类访问我的 debugGroup:
FlexGlobals.topLevelApplication.scrollerDebug.debugGroup.addElement(comp_green);
这是为什么? 如何从 actionscript 正确访问我的内部容器 debugGroup?
【问题讨论】:
标签: actionscript-3 apache-flex