[osflash] Using components in FAME development
Igor V. Sadovskiy
isadovskiy at gmail.com
Mon Nov 28 02:39:24 EST 2005
Hello Justin.
I have the same issue.
I've reported it to Nicolas about a month ago and it's already in his TODO
list. But it seems he is working on HaXe now and have no a lot of time to
work on MTASC's fixes...
Igor
-----Original Message-----
From: osflash-bounces at osflash.org [mailto:osflash-bounces at osflash.org] On
Behalf Of Justin Clarke
Sent: Thursday, November 24, 2005 6:04 PM
To: osflash at osflash.org
Subject: [osflash] Using components in FAME development
Hi there,
when I use an existing swf with a component and compile using this class
(as a simple example from the MTASC site):
class Test
{
function Test()
{
mx.controls.Alert.show("hello world","title");
}
public static function main():Void
{
var t = new Test();
Debug.trace("Called");
}
}
for every n compiles the Test() gets called n times? This only happens
as soon as I add an MM component, I'm using this ANT build script in
Eclipse:
<?xml version="1.0" encoding="utf-8"?>
<project name="flashProject" default="compileMTASC">
<!-- user modifiable properties -->
<property name="ASFile" value="Z:\Flash
Projects\flashProject\src\com\dcinteract\Test.as"/>
<property name="SWFFile" value="Z:\Flash
Projects\flashProject\src\Test.swf"/>
<property name="classPath" value="Z:\Flash Projects\flashProject\src"/>
<property name="MacromediaClassPath" value="C:\Documents and
Settings\jclarke\Local Settings\Application Data\Macromedia\Flash MX
2004\en\Configuration\Classes"/>
<property name="additionalParams" value="-mx"/>
<target name="compileMTASC">
<exec executable="C:\Program Files\mtasc\mtasc.exe">
<arg line='-main "${ASFile}" ${additionalParams} -swf
"${SWFFile}" -cp "${classPath}" -cp "${MacromediaClassPath}"'/>
</exec>
</target>
</project>
I've been using FAMES for some proper projects, and have worked around
this problem by using -swf for the original file and -out to specify a
deploy swf which solves the problem, but as far as I can gather you
should be able to use an existing swf asset file, and compile back to
it, without classes and component instances being stacked on for every
compilation. Any pointers on what I'm doing wrong here - I thought
adding components should be pretty straightforward, and can't for the
life of me understand why MTASC would essentially add a new call to the
main class for every compile??
Thanks for any enlightenment!
cheers,
justin.
_______________________________________________
osflash mailing list
osflash at osflash.org
http://osflash.org/mailman/listinfo/osflash_osflash.org
More information about the osflash
mailing list