开发者

Flash Builder 4.5: s:WindowedApplication does not initialize

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.5 SKD.
  • 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.开发者_如何学Cadobe.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...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜