本文介绍了Flash Builder的4.5:S:的WindowedApplication不初始化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个非常类似的问题here,但所提供的答案并没有为我工作。

这是我在做什么:

  • 创建一个Flex(airTest)项目,并用4.5选择桌面的应用程序类型SKD。
  • 按钮添加到主应用程序,改变背景颜色。
  • 编译该项目。我什么也没看到。我必须从任务管理器杀了ADL。

如果我去编辑airTest-app.xml中,改变可见默认为真,当我编译我在这里看到了正确的背景颜色设置的镶边。

如果我改变从&LT WindowedApplication标记; S:的WindowedApplication < MX:的WindowedApplication 它的工作原理它应该。

在code是pretty的简单,但我会贴吧,以防万一:

 < XML版本=1.0编码=UTF-8&GT?;
< MX:的WindowedApplication
    的xmlns:FX =htt​​p://ns.adobe.com/mxml/2009
    的xmlns:MX =库://ns.adobe.com/flex/mx
    XMLNS:S =库://ns.adobe.com/flex/spark
    的backgroundColor =#ff3366
    的creationComplete =_ onCerationComplete();>

    < FX:脚本>
        <![CDATA [
            / **
             *设置的图标和菜单。
             ** /
            私有函数_onCerationComplete():无效{
                跟踪(关于建立完整的);
            }

            私有函数_onButtonInitialize():无效
            {
                跟踪(按钮);
            }
        ]]≥
    < / FX:脚本>
    < S:按钮标签=测试初始化=_ onButtonInitialize()/>
< / MX:的WindowedApplication>
 

而airTest-app.xml中(零下意见,并没有用过的东西)

 < XML版本=1.0编码=UTF-8独立=无&GT?;
<应用的xmlns =htt​​p://ns.adobe.com/air/application/2.6>
    < ID> airTest< / ID>
    <文件名> airTest< /文件名>
    <名称>&airTest LT; /名称>
    <的versionNumber> 0.0.0< /的versionNumber>
    < initialWindow>
        <内容>该值将通过Flash Builder的输出app.xml中覆盖] LT; /内容>
        <在autoOrients>假< /在autoOrients>
        <全屏>假< /全屏>
        &其中;可见>真&所述; /可见光>
    < / initialWindow>
< /用途>
 

解决方案

我发现了一个线程在Adobe论坛上解决了这个问题。

原来有一个文件(mm.cfg中),其被损坏一些如何。通过删除该文件,一切都将按预期。

在我的Windows 7中,该文件位于:C:\用户{​​UsuarName} \的mm.cfg

这是相同的文件让我going坚果出于不同的原因不是很久以前...

There is a really similar question here, but the provided answer does not work for me.

This is what I'm doing:

  • Create a Flex (airTest) project and chose Desktop as application type using 4.5SKD.
  • Add a Button to the main application and change the background color.
  • Compile the project.I don't see anything. I have to kill adl from the Task Manager.

If I go and edit the airTest-app.xml and change the visible from the default to true, when i compile i get to see the chrome with the correct background color set.

If I change the WindowedApplication tag from <s:WindowedApplication to <mx:WindowedApplication it works as it should.

The code is pretty simple, but I will paste it just in case:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication
    xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:mx="library://ns.adobe.com/flex/mx"
    xmlns:s="library://ns.adobe.com/flex/spark"
    backgroundColor="#ff3366"
    creationComplete="_onCerationComplete();">

    <fx:Script>
        <![CDATA[
            /**
             * Set up the icon and menus.
             **/
            private function _onCerationComplete():void {
                trace("on creation complete");
            }

            private function _onButtonInitialize():void
            {
                trace("Button");
            }
        ]]>
    </fx:Script>
    <s:Button label="Test" initialize="_onButtonInitialize()"/>
</mx:WindowedApplication>

And the airTest-app.xml (minus comments and unused stuff )

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/2.6">
    <id>airTest</id>
    <filename>airTest</filename>
    <name>airTest</name>
    <versionNumber>0.0.0</versionNumber>
    <initialWindow>
        <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>
        <autoOrients>false</autoOrients>
        <fullScreen>false</fullScreen>
        <visible>true</visible>
    </initialWindow>
</application>
解决方案

I found a thread on the Adobe Forums that solved the problem.

It turns out there is a file (mm.cfg) that gets corrupted some how. By deleting that file, everything works as expected.

In my Windows 7 box, the file is located at:C:\Users{UsuarName}\mm.cfg

That same file got me going nuts for a different reason not that long ago...

这篇关于Flash Builder的4.5:S:的WindowedApplication不初始化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 02:03