Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 按钮顶部的总线指示器?_Apache Flex_Button_Depth_Busyindicator - Fatal编程技术网

Apache flex 按钮顶部的总线指示器?

Apache flex 按钮顶部的总线指示器?,apache-flex,button,depth,busyindicator,Apache Flex,Button,Depth,Busyindicator,我是flex的新手,使用Flex4.6和FB4.7。我试图创建一个“指示器前面”的按钮。我在谷歌上找到了一些关于图像堆叠的例子,但由于某些原因,它不能与按钮/指示器组合使用,我不知道为什么。。。我尝试使用“深度”属性,但没有效果,按钮出现在指示器上方,即假设指示器由[x]标记: [button] [x] <== indicator 以下是我使用的布局: <s:VGroup width="100%" height="100%" verticalAlign="top" hori

我是flex的新手,使用Flex4.6和FB4.7。我试图创建一个“指示器前面”的按钮。我在谷歌上找到了一些关于图像堆叠的例子,但由于某些原因,它不能与按钮/指示器组合使用,我不知道为什么。。。我尝试使用“深度”属性,但没有效果,按钮出现在指示器上方,即假设指示器由[x]标记:

[button]
  [x]   <== indicator
以下是我使用的布局:

<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>

有什么办法吗?
谢谢

您似乎误解了布局组(
VGroup
HGroup
TileGroup
)的功能。他们在二维空间工作,而不是三维空间。因此,通过将两个对象放置在一个组中,它们将沿y轴垂直堆叠,而不是沿z轴(如您所需)

您只需要在这里使用一个简单的
。Group没有布局(它是Vgroup的父类,以及许多其他类),因此所有定位都由子类而不是父类(Group)处理



这将在0级创建一个按钮,然后在1级(1>0)放置一个总线指示器,并将其水平和垂直居中(
horizontalCenter
verticalCenter
以从中心到各自轴的像素为单位)

从技术上讲,
类确实具有布局。它是
BasicLayout
类,它使
水平中心
垂直中心
,以及
顶部
底部
左侧
右侧
约束和简单的绝对定位(带x/y坐标)起作用。@SunilD。好电话。也许我应该更具体地回答。Group的行为类似于uber Sprite,而VGroup和HGroup则没有,并且实际上对其子对象具有单轴控制(至少在默认情况下是这样)。不管是哪种方式,知道两者的区别仍然很好。
<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>
<s:Group>
    <s:Button/>
    <s:BusyIndicator horizontalCenter="0" verticalCenter="0"/>
</s:Group>