0

有没有办法在我的主应用程序中添加图像,使其位于 popWindow 之上?Z-index 的等效项应将其呈现在顶部。

所以,我有一个 popWindow,我想在 popWindow 的顶部添加一个图像。

如果在我的主应用程序中我使用:

var floatingImage:Image = new Image;
 floatingImage.source = image_path;
 floatingImage.y = 200;
 floatingImage.x = 200;
 addChild(floatingImage);

然后图像在主应用程序的顶部,但它仍然在我的 popWindow 下方。

我会将图像直接添加到 popWindow,但我使用的是 FlashEff 2,并且由于某种原因,如果我在 popUp 中有图像,效果将不起作用。所以,我想我会在主应用程序中添加图像并让它漂浮在 popWindow 上方。

另一种可能性可能是以某种方式检查popWindow是否打开,然后将图像直接添加到popWindow。

如果有人有任何建议,我很想听听他们的意见。

谢谢你。

-拉克西米迪

4

1 回答 1

0

不是很推荐,但这里是代码。这不适用于 UIComponents 和 DisplayObjects。

[Embed(source="assets/MyImage.png")]
private var MyImage:Class;

protected function button1_clickHandler(event:MouseEvent):void
{
    var image:DisplayObject = new MyImage();
    stage.addChild(image);
}
于 2010-11-27T22:50:36.513 回答