我是一个新手来flex,使用flex 4.6和FB 4.7。我正试图在Button的前面(和中间)创建一个BusyIndicator。我在Google上找到了一些关于图像堆叠的例子,但由于某种原因它不能用于按钮/指示器组合,我不知道为什么......我尝试使用depth属性,但它没有效果,按钮出现指示器之上,即假设指示器被标注为[X]:Flex:BusyIndicator在按钮之上?
[button]
[x] <== indicator
我想是,该指示器会在前面,并在,按钮的中部:
[bu[x]ton]
这里是我使用的布局:
<s:VGroup width="100%" height="100%" verticalAlign="top" horizontalAlign="center">
<s:Button id="mybtn" label="My Inbox" click="onInbox()" depth="1"/>
<s:BusyIndicator id="myBusyIndicator" rotationInterval="50" depth="2" />
</s:VGroup>
任何想法如何做到这一点? 谢谢!
从技术上讲,'Group'类* *具有布局。它是'BasicLayout'类,这就是'horizontalCenter','verticalCenter','top','bottom','left','right'约束和简单的绝对定位(带有x/y coorindates) )工作。 – 2013-04-10 20:29:52
@SunilD。好决定。也许我应该对答案更具体。组的行为像一个超级精灵,而VGroup和HGroup实际上并没有对其子进行单轴控制(至少默认情况下)。无论哪种方式,仍然很好地知道差异。 – 2013-04-10 21:01:20