The following code compiles fine in flex builder 3, but throws an error when compiled using the command line and flex sdk 3.3.
<?xml version="1.0" encoding="utf-8"?>
<ww:TestApplication
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:ww="*"
layout="absolute"
backgroundColor="#FFFFFF"
>
<mx:Label x="10" y="10" text="simple test"/>
</ww:TestApplication>
The error message is: Unable to locate specified base class 'TestApplication' for component class 'TestApplication'.
The problem only happens when I use the default package for my custom classes. If instead I use
xmlns:ww="somepackage.*"
and change my matching AS class accordingly, then it compiles fine using the sdk. Am I missing an argument when compiling or something? Are there differences when compiling a project using flex builder and flex sdk? If so, which ones?
Best Answer
The paths have to be explicitly defined using mxmlc or compc. Here is an explanation of the flags:
References