解决方案是使用一个 Flex 容器,它允许将内容分层在其他内容之上。按照设计,VBox和HBox容器不允许这样做。他们在垂直或水平布局中布局其内容,没有重叠。
您可以使用Canvas或Group容器将组件覆盖在其他组件之上。由于您使用的是 Flex 4,我建议使用Group而不是Canvas... 和VGroup而不是VBox... 和HGroup而不是HBox.
这是您可以使用 Flex 4 类进行的简单布局:
<s:Group>
<s:VideoDisplay top="0" bottom="0" left="0" right="0" />
<s:HGroup bottom="0" left="0" right="0"/>
</s:Group>
该VideoDisplay组件是您用来显示视频的任何内容。请注意,top/bottom/left/right 属性告诉父Group对象布局此组件,使其顶部距父(组)的顶部边缘 0 像素(对于底部/左侧/右侧边缘类似)。
HGroup组件是保存播放器控件的容器。HGroup定位为距父容器的底部、左侧和右侧边缘 0 像素。
不应在鼠标悬停时更改播放器控件容器的高度,而应将可见属性HGroup(或HBox)容器设置为 false。
As they say, a picture is worth a thousand words. But on StackOverflow, code is worth a thousand pictures. If this answer doesn't help, you should edit your question and add the actual code you're using :)