This content has been marked as final. Show 4 replies
It seems that I always have an active application that I am working on to test AS components, and have never had problem.
You can't compile an AS3.0 class file without an MXML file. You need at least one MXML file that either import and instantiates, or extends an AS3.0 file to "get the ball rolling".
You can compile AS3 classes, esp. if you create an Actionscript project instead of a Flex project. The important thing is to make sure whatever you have set as your "Main application", whether it be an MXML or Actionscript class, somewhere down the line has a variable of the type of class you want to use.
You may want to look at using FlexUnit to do your Actionscript testing. "FlexUnit" is a bit of a misnomer as it's specifically designed to test Actionscript inside of Flex.
A few things that might help:
- If you don't need to use any Flex UI components, you can create a plain ActionScript project in Flex Builder and have your main application itself be an AS file, with no MXML involved. It think this is what you referred to originally, but just wanted to clarify Chekote's post.
- You're right, AS applications work a little differently than Java ones. They are different programming languages, after all :-)
- Can you describe your problem with the Run menu in more detail? You should be able to chose different applications from within your project to run. If you are using FB Standalone, the default action of the Run button will change depending on what editor tab is current, but this should be reflected by the button's tooltip.
- MXML applications cannot be put in a subdirectory. You should be able to put other MXML files (custom components) in subdirectories of your source root, however.