我正在構建一個Flex 4應用程序(使用flexmojos而不是FlexBuilder)。如果我創建一個測試應用程序如下,使用MX:應用程序,然後我看到一個按鈕,我希望:Flex 4應用程序空白
<mx:Application
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="http://www.adobe.com/2006/mxml">
<s:Button
label="Button"/>
</mx:Application>
但是,如果我用S:那麼應用程序的所有我看到的是一個空白(白色)屏幕:
<s:Application
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="http://www.adobe.com/2006/mxml">
<s:Button
label="Button"/>
</s:Application>
順便說一下,我目前沒有使用html包裝,我只是直接在瀏覽器中加載瑞士法郎。
這是我的聚甲醛...
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.aaa.bbb</groupId>
<artifactId>app</artifactId>
<packaging>war</packaging>
<version>2.0-SNAPSHOT-1</version>
<name>app</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.9</version>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.5.0.20967</version>
<type>pom</type>
</dependency>
</dependencies>
<extensions>true</extensions>
<configuration>
<policyFileUrls>
<url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
</policyFileUrls>
<rslUrls>
<url>http://fpdownload.adobe.com/pub/{extension}/flex/4.5.0.20967/{artifactId}_{version}.{extension}</url>
</rslUrls>
</configuration>
<executions>
<execution>
<id>flex-compile</id>
<phase>compile</phase>
<goals>
<goal>compile-swf</goal>
</goals>
<configuration>
<output>src/main/webapp/Main.swf</output>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>textLayout</artifactId>
<version>4.5.0.20967</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>4.5.0.20967</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark</artifactId>
<version>4.5.0.20967</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>sparkskins</artifactId>
<version>4.5.0.20967</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>rpc</artifactId>
<version>4.5.0.20967</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>datavisualization</artifactId>
<version>4.5.0.17855</version>
<type>swc</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>4.5.0.20967</version>
<type>pom</type>
</dependency>
</dependencies>
</project>
任何人知道我在做什麼錯? 感謝
UPDATE:
我現在已經儲存在相同的位置.swf文件的所有RLSS爲.swz文件,我已經設置了RSL網址如下:
<configuration>
<policyFileUrls>
<url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
</policyFileUrls>
<rslUrls>
<url>{artifactId}_${flex.sdk.version}.{extension}</url>
<url>http://fpdownload.adobe.com/pub/{extension}/flex/${flex.sdk.version}/{artifactId}_${flex.sdk.version}.{extension}</url>
</rslUrls>
</configuration>
不過,該應用程序只是空白。使用FireBug似乎沒有任何我可以看到的RSL請求,也沒有任何與此有關的錯誤消息。好像RSL加載甚至沒有嘗試過。
這是離奇的!
您應該會收到錯誤消息。你甚至運行Flash Player調試? –
這個問題有沒有進展?我面臨着同樣的問題,flex 4.5.1 release + flexmojos 3.8(我必須用一個更新的flex-compiler-oem工件重新編譯) – 2011-07-13 08:48:14