English 中文(简体)
Maven FlexMojos生产空洞空气。 最后产品没有窗户。 创建SWF,但不开放
原标题:Maven FlexMojos produces empty Air app. Final product has no window. Creates SWF but will not open it

Problem

When I run my air application (compiled via flexmojos), it seems "empty"--there is no window at all. It works perfectly when compiled from Flash Builder.

Background

我正在用Maven s flexmojos plugin on MacOS X:狮子汇编Adobe Air Application。 它成功地制作了SWF文档和AIR档案。

  • When I double-click the SWF file, it opens just fine
    (and crashes with an error you d expect--since it s not running in the AIR environment)

  • When I double-click the AIR file, no window opens!
    (I see my application name in the Mac menu bar but no application window and no errors)

When I look under /Applications/MyApplication.app/Contents/Resources
I see the following files:

META-INF            MyAppMainAir.swf
MyAppMainAir.css    mimetype

file夫的档案有适当的大小和开放,如预期。

<>POM snippet

<plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <version>${flexmojos.version}</version>
            <configuration>
            <flexBuilderCompatibility>true</flexBuilderCompatibility>
                <sourceFile>${application.name}.mxml</sourceFile>
                <finalName>${application.name}</finalName>
                <descriptorTemplate>${project.build.sourceDirectory}/${application.name}-app.xml</descriptorTemplate>
                <storepass>${keystore.password}</storepass>
                <includeStylesheets>
                    <stlyesheet>
                        <name>${application.name}.css</name>
                        <path>${application.name}.css</path>
                    </stlyesheet>
                </includeStylesheets>
                <licenses>
                    <flexbuilder3>${flex.license}</flexbuilder3>
                </licenses>
                <targetPlayer>10.2.0</targetPlayer>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>sign-air</goal>
                    </goals>
                </execution>
            </executions>
</plugin>

Question

我的SWF档案为什么得到适当建立,但我的AIR申请却获得一个窗口。 当我建立/管理闪电公司的申请时,它完全运作。

赞赏任何投入/建议。

最佳回答

Solution

rel=“nofollow>> 在GalMojos 谷歌集团调查后,我需要提出以下选择:

<swfVersion>11</swfVersion>

For some reason, this was defaulting to 10, which caused the problem. Add this line, everything works perfectly!

Alternate Fix

或者,我也能够通过装上空气-汇号文档来解决这个问题:

<loadConfig>${flex.sdk}/frameworks/air-config.xml</loadConfig>

This file can also be found in the repository:

${path_to_m2_repo}/com/adobe/flex/framework/framework/${flex.sdk.version}/configs_zip/air-config.xml

例如,flex.sdk.version=4.5.1.21328


Other Invisible Window Issue

Also for the intial window to appear, you may need to adjust the descriptor values, setting visible=true:

<initialWindow>
    <content>Main.swf</content>
    <autoOrients>false</autoOrients>
    <fullScreen>false</fullScreen>
    <visible>true</visible>
</initialWindow>

The error I was having, combined with this set to false caused the window not appear, at all, which was confusing. After setting visible=true, the window would at least show up but all spark contents were missing. Once the error was fixed, I could set visible back to false.

问题回答

暂无回答




相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签