【问题标题】:create custom chrome adobe air desktop application using flex4 sparks controls使用 flex4 sparks 控件创建自定义 chrome adobe air 桌面应用程序
【发布时间】:2012-04-01 19:12:23
【问题描述】:

我在 Google 上四处搜索,但这是教我如何创建 Adob​​e Air 桌面应用程序的唯一资源uses mx controls instead

在 app-xml 中,我已将 transparent 设置为 true 并将 systemChrome 设置为 none

以下是我的主要mxml

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:mx="library://ns.adobe.com/flex/mx"
                       xmlns:dragdrop="org.robotlegs.demos.draganddrop.*"
                       xmlns:view="org.robotlegs.demos.draganddrop.view.*"
                       mouseOver="layoutCanvas.visible = true;"
                       mouseOut="layoutCanvas.visible = false;"
    >

    <fx:Style>
        @namespace s "library://ns.adobe.com/flex/spark";
        @namespace mx "library://ns.adobe.com/flex/mx";

        s|Application {
            background-alpha:"0.7"; 
            padding: 0px;

        }
    </fx:Style>


    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
        <dragdrop:DragAndDropContext contextView="{this}"/>
    </fx:Declarations>

    <s:Image id="background" width="100%" height="100%"
             source="@Embed('theme/assets/MaxBackground.png')"/>

    <s:BorderContainer id="layoutCanvas" width="100%" height="100%" visible="false">
        <s:Image id="applicationClose" right="5" top="2"
                 click="stage.nativeWindow.close()"
                 source="@Embed('theme/assets/buttons/CLOSE WINDOW icon.png')"/>
        <s:Image id="applicationMaximize" right="25" top="2"
                 click="stage.nativeWindow.maximize()"
                 source="@Embed('theme/assets/buttons/EXPAND WINDOW icon.png')"/>
        <s:Image id="applicationMinimize" right="45" top="2"
                 click="stage.nativeWindow.minimize()"
                 source="@Embed('theme/assets/buttons/COLLAPSED WINDOW icon.png')"/>

    </s:BorderContainer>


</s:WindowedApplication>

我有两个问题。

1) 初始应用程序窗口大小。如何将其设置为 100% 全屏? 2)底部有一个奇怪的灰色水平页脚。我该如何摆脱它?见here

我不想使用 mx 控件。我想尽可能多地使用 sparks 控件。

谢谢。

【问题讨论】:

    标签: actionscript-3 apache-flex air flex4 flex-spark


    【解决方案1】:

    1) 初始应用程序窗口大小。如何将其设置为 100% 全屏?

    为此,您可以将CREATION_COMPLETE 处理程序添加到您的应用程序,并在该处理程序中添加类似于以下内容的行:

    this.maximize() 其中this 是您的WindowedApplication。

    2) 底部有一个奇怪的灰色水平页脚

    听上去,这是状态栏。尝试将 WindowedApplication 根标记上的 showStatusBar 属性设置为 false

    showStatusBar="false"

    希望这会有所帮助。

    【讨论】:

    • 谢谢你,詹姆斯。我有更多与 flash-builder 相关的问题。我可以直接联系你吗?
    • 当然。你有我可以给你发电子邮件的联系表格吗?
    • 一个github账号怎么样?你是否有一个?这样我就可以在那里给你发邮件了..
    • 已将我的电子邮件发送给您。你能看到吗?
    • 嗨,James,我需要有关 adobe air 应用程序皮肤的帮助。也许你可以在这里帮助我? stackoverflow.com/questions/9926445/…
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-04
    • 2023-03-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多