MTASC & V2 Components

I have a very large Flash projects which I liked to compile with MTASC.
The projects uses quite every V2 component including the Data Components, the Slider component from a DRK and the TabBar component.

The problem is, that not all components provide a source Actionscript file which is required for compilation with MTASC.

I had to extract the following component SWCs (C:\Documents and Settings\[YOUR USERNAME]\Local Settings\Application Data\Macromedia\Flash MX 2004\en\Configuration\Components):
Slider.swc, TabBar.swc, DataSet.swc and RDBMSResolver.swc. The extracted SWC includes all intrinsic classes used by the component. To get the Actionscript file simply rename e.g. “mx.controls.TabBar.asi” to “TabBar.as” and copy the .as into the corresponding directory in the mx-classpath (C:\Program Files\Macromedia\Flash MX 2004\en\First Run\Classes\mx)

I had to add the following class files:
// from Slider.swc
mx.controls.Slider

// from TabBar.swc
mx.controls.TabBar

// from DataSet.swc
mx.data.components.DataSet
mx.data.components.datasetclasses.DeltaPacket
mx.data.binding.Binding
mx.data.binding.EndPoint
mx.data.binding.Formatter
mx.data.binding.DataAccessor
mx.data.binding.TypedValue
mx.data.binding.DataType
mx.data.components.datasetclasses.Delta
mx.data.components.datasetclasses.DeltaItem
mx.data.binding.DateBase
mx.data.binding.FieldAccessor
mx.utils.StringFormatter
mx.xpath.XPathAPI
mx.xpath.FilterExpr
mx.xpath.FilterStack
DataSet.as comment out lines 98,103,117,119,157,159,168,175,190,192
FilterExpr.as comment out lines 11,13,15

// from RDBMSResolver.swc
mx.data.components.RDBMSResolver
mx.data.components.resclasses.FieldInfoItem
FieldInfoItem comment out lines 48,59,64,70,75

It was a lot of work but now it works like a charm. I haven’t tested all cases but it looks like all is compiled correctly.
Another issue is that I wrote my traces with “add” like e.g.
[as]trace(“value ” add value);[/as]
This seems not supported by MTASC and I had to replace the “add” with “+”
about 500 times ;)

Now I can compile with MTASC and the compilation time is reduced from about 40 seconds to 2 seconds. Wooooohooo!
I hope that this process will be easier with new MTASC releases but I am not sure about the license issues of SWC files.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">