"external" scopes means that it's not compiled into the output swf and expects the player to have the library baked in itself. The playerglobal swc would be one example since things like Dictionary or Array are baked into the player itself. I would assume that charting is not. You probably meant a scope of rsl or cached since those scopes mean that the library is not baked in either but would be fetched on start-up and hence can be cached across flex applications either though the browser cache or in player storage. If you are just building a stand-alone app (and not too concerned with the final swf size), removing the scope (which then defaults the swc to be compiled into the swf) should work just fine.
I suppose the original "external" scope would work if you are loading this as a module into another flex application (samples are commonly driven by a wrapper I guess) that already has the charting library built-in. Just a guess though. Hope it helps. Clement On Fri, Jul 1, 2011 at 5:18 PM, Bruno Medeiros <[email protected]> wrote: > I tried to compile a project that uses components of datavisualization, > more precisely the code of Adobe's Line chart > example<http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_08.html>, > using flex mojos. I got a strange error after opening the generated swf. > Nothing appears and the following message appears on debug flash player: > > > > -------------------------------------------------------------------------------------------------------- > VerifyError: Error #1014: Class mx.charts::CategoryAxis could not be found. > > at global$init() > at _sandboxWatcherSetupUtil$/init() > at mx.managers::SystemManager/ > http://www.adobe.com/2006/flex/mx/internal::docFrameHandler()[C > :\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:3058] > at > mx.managers::SystemManager/docFrameListener()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2916] > > > ---------------------------------------------------------------------------------------------------------- > > Follows the pom I tried: > > <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>test</groupId> > <artifactId>sandbox</artifactId> > <packaging>swf</packaging> > <name>Chart Example</name> > <version>1.5-SNAPSHOT</version> > <description>Módulo da teste do Datavisualization</description> > > <properties> > <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> > <!-- 3.2.0.3958 3.6.0.16995 --> > <flex.sdk.version>3.6.0.16995</flex.sdk.version> > <flexmojos.version>4.0-beta-7</flexmojos.version> > </properties> > <build> > <finalName>sandbox</finalName> > <sourceDirectory>src</sourceDirectory> > <plugins> > <plugin> > <groupId>org.sonatype.flexmojos</groupId> > <artifactId>flexmojos-maven-plugin</artifactId> > <version>${flexmojos.version}</version> > <extensions>true</extensions> > <configuration> > <sourceFile>sandbox.mxml</sourceFile> > <debug>true</debug> > <targetPlayer>9.0.0</targetPlayer> > <compiledLocales> > <locale>en_US</locale> > </compiledLocales> > <staticLinkRuntimeSharedLibraries>true</staticLinkRuntimeSharedLibraries> > </configuration> > > <dependencies> > <dependency> > <groupId>org.sonatype.flexmojos</groupId> > <artifactId>flexmojos-flex3-compatibility-layer</artifactId> > <version>${flexmojos.version}</version> > </dependency> > <dependency> > <groupId>com.adobe.flex</groupId> > <artifactId>compiler</artifactId> > <version>${flex.sdk.version}</version> > <type>pom</type> > </dependency> > </dependencies> > </plugin> > </plugins> > </build> > > <dependencies> > > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>flex-framework</artifactId> > <version>${flex.sdk.version}</version> > <type>pom</type> > <exclusions> > <exclusion> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>playerglobal</artifactId> > </exclusion> > </exclusions> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>playerglobal</artifactId> > <version>${flex.sdk.version}</version> > <classifier>10</classifier> > <type>swc</type> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>datavisualization</artifactId> > <version>${flex.sdk.version}</version> > <type>swc</type> > <scope>external</scope> > </dependency> > <dependency> > <groupId>com.adobe.flex.framework</groupId> > <artifactId>datavisualization</artifactId> > <classifier>en_US</classifier> > <version>${flex.sdk.version}</version> > <type>rb.swc</type> > <scope>external</scope> > </dependency> > > </dependencies> > > </project> > > After removing *<scope>external</scope>* of the last two dependencies, > averything worked fine. Is this expected? It's strange that compile runs ok > and We got that weird error on runtime. This scope probably came from a very > old pom I configured some day, and was being copied from the times. My > question is: This scope makes any sense at present time? If the answer is > no, I think it should be validated. If the answer is yes, a warning should > be printed saying explicit the condition this scope should be used. > > And again, thanks for the great job! > > -- > BrunoJCM > > -- > You received this message because you are subscribed to the Google > Groups "Flex Mojos" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/flex-mojos > > http://flexmojos.sonatype.org/ > -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
