开发者

Flex 3: Add an Image so that it Floats Above a PopWindow

Is there a way to add an image in my main app, so that it is on top off a popWindow? The equivalent of the Z-index should render it on top.

So, I've got a popWindow and I want to add an image on top of the popWindow.

If in my main app I use:

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

Then the image is on top of main App, but it is still below my popWindow.

I would add the image directly to the popWindow, but I'm using FlashEff 2, and for some reason the effect won't work if I have an image in the popUp. So, I thought that I would add th开发者_C百科e image in the main app and have it float above the popWindow.

Another possibility might be to check somehow if the popWindow is open and then add the image directly to the popWindow.

If anyone has any suggestions, I'd love to hear them.

Thank you.

-Laxmidi


Not really recommended but here is the code. This won't work well with UIComponents just 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);
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜