View unanswered posts | View active topics


Reply to topic  [ 1 post ] 
SWF building with @mtasc command 
Author Message
Admin

Joined: Tue Aug 30, 2005 6:14 pm
Posts: 1745
Location: Helsinki, Finland
Post 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 FlashConnect
You 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 Files
The 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.

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


Last edited by Mika on Sat Dec 31, 2005 10:41 am, edited 1 time in total.



Tue Nov 08, 2005 7:40 am
Profile E-mail WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.