
SWF building with @mtasc command
FlashDevelop beta5 presents a new feature for building flash movies instantly. You just have to define additional mtasc parameters in a @mtasc comment tag and the ASCompletion plugin adds default class paths and the current class file to the mtasc build command.
Notes:
- comment tags must be declared in a /** ... */ bloc (all /* ... */ comments are ignored),
- the @mtasc tag must be in the
first comment bloc of the class.
Code:
/**
* @mtasc <switches>
*/
Here's a sample class for testing this feature. Save this class somewhere and hit Control+F8 or click the "Quick MTASC Build" menu item from the tools->flash tools menu. Voila, your movie gets build instantly.

Code:
/**
* Test class for testing mtasc swf building in FlashDevelop.
* @mtasc -swf c:\Test.swf -header 500:400:24:EFEFEF -main
*/
class Test {
/**
* Constructor. Creates a text field.
*/
public function Test() {
var textFormat:Object = new TextFormat();
textFormat.font = "Tahoma";
textFormat.size = 12;
_root.createTextField("sample", 1, 20, 20, 0, 0);
_root.sample.selectable = false;
_root.sample.border = true;
_root.sample.autoSize = true;
_root.sample.background = true;
_root.sample.text = "This is great, eh?";
_root.sample.setTextFormat(textFormat);
}
/**
* Entry point of the class
*/
public static function main():Void {
var test:Test = new Test();
}
}
Using FlashConnectYou can explicitely use the org.flashdevelop.utils.FlashConnect class to display colored debug text in FlashDevelop's output panel. Or you can route your trace() commands directly to FlashDevelop's output panel using the MTASC-compatible mtrace() method.
Code:
/**
* @mtasc ... -trace org.flashdevelop.utils.FlashConnect.mtrace org/flashdevelop/utils/FlashConnect.as
*/
Flash 8 Trust FilesThe Flash 8 plugin does not allow local SWFs to access remote resources if this SWF (and it's local resources) are not "trusted".
FlashDevelop beta7 includes a way to automatically create Flash Trust files for you SWF.
Code:
/**
* @mtasc -swf Test.swf -header 500:400:24:EFEFEF -main -trust
*/
This will actually add the folder where the SWF is located to the trusted contents of the Flash Player.

The Files Explorer can also be used to create the trust files: select "Add To Flash Trusted Files" in the context menu.