如何更改 Flex 中的模式透明度

发布于 2024-12-17 01:12:37 字数 654 浏览 5 评论 0原文

我使用 PopUpManager 创建一个模态窗口

_zoomImgPopUp = PopUpManager.createPopUp(this, Image, true) as Image;

当打开模态窗口时,所有背景都是灰色且模糊的。 我怎样才能改变背景的颜色、模糊和透明度。

我找到这篇文章 http://mprami.wordpress.com/2008/04/22/alert_popup_modal_transparancy_color_blur_changes/

但它适用于“mx”应用程序。我需要一些带有“火花”组件的东西。

UPD:已解决。它必须是:

_zoomImgPopUp.setStyle("modalTransparency", 0);
_zoomImgPopUp.setStyle("modalTransparencyBlur", 0);
PopUpManager.addPopUp(_zoomImgPopUp, this, true);

I create a modal window with PopUpManager

_zoomImgPopUp = PopUpManager.createPopUp(this, Image, true) as Image;

When the modal window is opened, all background is gray and with blur.
How can i change color, blur and transparency of background.

I find this article
http://mprami.wordpress.com/2008/04/22/alert_popup_modal_transparancy_color_blur_changes/

but it is for "mx" application. I need something with "spark" components.

UPD: Solved. It must be:

_zoomImgPopUp.setStyle("modalTransparency", 0);
_zoomImgPopUp.setStyle("modalTransparencyBlur", 0);
PopUpManager.addPopUp(_zoomImgPopUp, this, true);

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘羡 2024-12-24 01:12:37

您可以访问影响模态的标签中的样式。

您应该能够执行此操作:

_zoomImgPopUp.setStyle("modalTransparency",1);
_zoomImgPopUp.setStyle("modalTransparencyBlur",3);
_zoomImgPopUp.setStyle("modalTransparencyColor", #ff0000);

您可以将其放入引用弹出窗口的应用程序/组件/模块中。

<fx:Style>
        @namespace s library://ns.adobe.com/flex/spark;
        @namespace mx library://ns.adobe.com/flex/halo;
        global {
            modal-transparency: 1;
            modal-transparency-blur: 2;
            modal-transparency-color: #ff0000;
        }
</fx:Style>

You have access to styles in the tag that affect Modal.

You should be able to do this:

_zoomImgPopUp.setStyle("modalTransparency",1);
_zoomImgPopUp.setStyle("modalTransparencyBlur",3);
_zoomImgPopUp.setStyle("modalTransparencyColor", #ff0000);

You can put this in your application / component / module that references the popup.

<fx:Style>
        @namespace s library://ns.adobe.com/flex/spark;
        @namespace mx library://ns.adobe.com/flex/halo;
        global {
            modal-transparency: 1;
            modal-transparency-blur: 2;
            modal-transparency-color: #ff0000;
        }
</fx:Style>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文