Configuration
is intended for general configuration at startup, that
is the same for Flash, Flex and MTASC.
Configuration
is a central part of a configuration system. It should
contain only the not-plattform-specific configuration. If you want to use this
configuration take a look at org.as2lib.app.conf.FlashoutApplication,
MtascApplication and FlashApplication.
Configuration
sould be overwritten. Other classes reference to it but
itself contains no code. If you want to overwrite it you can create the same class
in your application directory with your configuration code.
Example:
import com.domain.app.*;
class main.Configuration {
public static var app:MyApplication;
public static function init(Void);Void {
app = new MySuperApplication();
app.start();
}
}
It is important to have a static init
method that does all the needed
configuration. This method must, as in the above example, be declared in a class
that has the same namespace ( main
) and name ( Configuration
as
this example class. Besides that you can declare any further method in the class
or extend any class and implement any interface you like.
If you now want to use this class MTASC you must pay attention to the class
paths of the compiler to get it to run!
The Macromedia Flash MX 2004 Compiler takes the topmost as most important so
you would have to set your classpaths like this:
D:\Projects\MyApplication\src\ D:\Libraries\as2lib\main\src\
-cp "D:/Libraries/as2lib/main/src" -cp "D:/Projects/MyApplication/src/"
static public function init(Void):Void
This method is used by the main
or init
method of the classes
org.as2lib.app.conf.FlashoutApplication, FlashApplication
and MtascApplication.