0

I'm working on a Java web application which contains some Flash modules.
So far I've used Adobe Flash builder to compile the Flash source code and manually integrate the swf file into the war, and the web application can be deployed and runs successfully.
Recently the customer, who also is the source code proprietary, asked for managing the Flash source modules using the flex-mojo maven plugin.
The problem is that the application compiles and is deployed with no errors but no longer works. When you access the application from a browser after the login phase a blank screen appears and there is no way to interact with the application. The pom.xml used to build the Flash module is the following (I omitted irrelevant parts):

<plugins>
  <plugin>
    <groupId>org.sonatype.flexmojos</groupId>
    <artifactId>flexmojos-maven-plugin</artifactId>
    <version>4.0-RC2</version>
    <extensions>true</extensions>

    <configuration>

        <contextRoot>myapp</contextRoot>
        <services>../myapp-war/src/main/webapp/WEB-INF/flexCompile/services-config.xml</services>
        <localesSourcePath>${basedir}/locale/{locale}</localesSourcePath>

        <debug>true</debug>
        <output>target/myapp.swf</output>
        <definesDeclaration>
          <property>
            <name>BUILD::buildNumber</name>
            <value>"Versione: ${project.version}"</value>
          </property>
        </definesDeclaration>
          <localesRuntime>
            <locale>en_US</locale>
          </localesRuntime>
         <localesCompiled>
            <locale>en_US</locale>
          </localesCompiled>
    </configuration>
  </plugin>
</plugins>

It's important to notice that the size of the two compiled swf files are different, so this seems to be a compiler version issue. Is there anyone who uses to develop with Flash and Java that can give me some hint about solving this issue, even just pointing me to resources, forums, and so on?

remigio
  • 4,101
  • 1
  • 26
  • 28
  • 1
    Different sizes in applications may come about because of compiler settings. If you are not using RSls one, but do in another, the one that doesn't use RSLs will have a larger SWF. If you are not exporting a release build from Flash Builder, you will get a larger SWF b/c all the 'debug info' is included. Do you have the debug version of Flash Player installed? If not, install it. There could be a runtime error you are not seeing. – JeffryHouser Nov 26 '12 at 17:10
  • @www.Flextras.com Thanks a lot for your help, apparently the project has been successfully compiled and run with Flex using the same settings as the flex-mojos ones. I'm going to take your advice and try to debug it. – remigio Nov 27 '12 at 07:18

1 Answers1

1

Did you try setting the swfVersion property to your configuration? It would be something like this:

<swfVersion>13</swfVersion>

The version is specific to your targeted player. You can find which version you need here

As a general good practice, do not forget to check myapp-config.xml which contains every options passed by Flexmojo to mxmlc. This file is located in your target directory.

htulipe
  • 1,575
  • 1
  • 10
  • 22