As2ant - Apache Ant Tasks for MTASC and Swfmill - has finally been released officially. It is a sub-project of the As2lib and provides convenient Ant integration for MTASC and Swfmill together with a Swf Task that is a mixture between the Mtasc and Swfmill Tasks and allows for easier usage.
For further information on Ant take a look at the OSFlash Page: Ant [Open Source Flash]
If you find any errors please report them. If you want a new feature tell me about it. If you need support contact me. ![]()
I hope you’ll love working with the tasks.

6 Responses to “As2ant - Swf, Swfmill and Mtasc Ant Tasks”
Hello Simon!
Thanks for great class, but I have some issues with it.. On compiling, I got following error from mtasc:
[mtasc] Warning : The MovieClip paneButton needs the class com.spdllc.controls.PaneButton which was not compiled :
[mtasc] Please force compilation of this class by adding it to the commandline.
Its a usual AS2 class which is linked to movieclip in FlashIDE with linkage settings
While compiling with flashout, I can solve this by specifying -pack options and forcing mtasc to compile all files from package.. But as2ant doesnt support -pack options. How I can solve this? How to specify files to compile to mtasc? Tried ’srcset’ tag,but in this case mtasc trying to find main() method in first file its compile in srcset.
So,I did some fixes and got -pack options to work with your code - but now I start to receive ‘type error Redefinition’ of my main app class, which is in the same package. So, its not a solution
Thanks in advice
Igor
Hi Igor.
Oh, -pack, I must have missed this. How did you implement the -pack option? And what exactly is the difference between the mtasc-command produced by the Mtasc Task and the one you typed manually? Could you post the two commands?
You may also try before to set the split-attribute to false when you use the srcset-tag:
<mtasc … split=”no”>
<srcset …>
…
</srcset>
</mtasc>
Greetings,
Simon
PS: The mtasc-commands produced by the Mtasc Task is pretty messy right now, it will be much more clearer in the next release.
i canīt run the buidfiles of the samples anyway. i think the problem is related to the mtasc executable. Ant doesnīt log any message (just ’succesful build’). i tried to put mtasc.exe in the same folder as build.xml, in the PATH, with mtasc attribute in build.xml,…
I tried both in Windows and Mac.
anyway, great job. thanks!
Hi Miguel.
If the mtasc executable could not be found an error message should be shown.
Does this only happen with the sample builds? For all sample builds the default target is ‘usage’ which prints all available targets. If you execute the build-file with ‘ant sample’ everything should work fine.
I don’t know what causes the error.
Greetings,
Simon
PS: I’m going to release as2ant 1.0 beta this week. The output is much better now. There is also support for the -pack and -infer argument now.
oh, Itīs OK. I typed just ‘ant’, I didnīt realize that the task is not included in the ‘default’ attribute. What stupid… I love this tasks, I develop in Mac and Windows and I donīt have to use different build.xml now!!
I usually document my code with an exec Task and as2api. will you include a javadoc-like task in the next release?
thanks
PS: I’m developing a regular expressions API for ActionScript (bit slowly, I’m alone). Do you plan to include something like this in as2lib API?
Hi Miguel.
“I love this tasks”
I’m glad to hear that.
As2lib is currently switching from VisDoc to As2api, so I will write a task for it sooner or later to include it in the distribution build-file.
Igor Sadovskiy has already written a regular expression implementation for us that is similar to the one from Java. It is not included in a release yet because there is still some documentation missing but it is already in the CVS.
You may contact him if you like and talk with him about your implementation. It would be nice to compare the two implementations regarding size, speed, … .
Here is his email address: igor[at]offshorecreations[dot]com[dot]ua
Greetings,
Simon