MTASC 1.5 was released today.
The changes:
- fixed type required to String for for…in variable
- fixed operator priority : a || b && c -> a || (b && c)
- error when multiple extends, interface cannot extends class
- warning when import not used (no longer add class)
- fixed error message when class not found
- register only one time the package
- errors on 32K bytecode size limit reached
- fixed operators priority for | ^ & against >> and % against * /
- forbid contructor returns and return type (modified headers)
- fixed class ordering problem with -keep
- fixed calls to super getter/setter problem
If you are using PrimalScript check out the integration of MTASC explained by Bit-101. You can also integrate Swfmill into this process explained on Protozoo.com.
Using the new AMFPHP 1.0 which is still in beta I heaviliy used the documentation which is created with DokuWiki.
I set up a DokuWiki for my own project I am currently running and I am very pleased with the features and its simplicity. There are of course many other Wikis out there with more features like e.g. email notification when changes occur but until now I will stay with DokuWiki.
The DokuWiki site also provides a good overview and comparison with other Wikis.
Today I ran into a problem about character encoding. I saved text in a self developed flash desktop application in an external XML file. The text was escaped using the escape-function of Flash.
Another application had to load the text from the XML file and the special characters were broken although I unescaped the text.
What was the problem? After a bit of research and comparison of the encoding I saw that the first application which saved the text used “System.useCodepage = true”.
The difference is that with using the codepage the text is saved in the traditional codepage of the operating system and without in Unicode:
var str:String = “Sönke”;
(I had to remove this line from the syntax highlighted part because iG:Syntax Hiliter does not like my “ö”, too!)
[as]trace(escape(str));// output: S%C3%B6nke (Unicode)
System.useCodepage = true;
trace(escape(str));// output: S%F6nke[/as]
The recommendation in the Flash docs is to not use the codepage to “ensure that users on all platforms can view external text files used in your SWF files […]”.
I switched my apps to not use the codepage. Additional I had to encode other external files which I use in the application to be encoded in UTF-8 or Unicode.
Conclusion: Never use “System.useCodepage = true”. I am aware of the fact that this is known and now I agree ![]()
Today Flashmagazine published a few reviews and feature comparison of the main Flash Projector Tools.
I am using Northcodes SWF Studio V2.2 and am still waiting for the next release of SWF Studio V3.
From the features Zinc looks promising but I heard that there are many bugs and the support is not the best.
Mike Chambers just blogged that Adobe and Macromedia are willing to merge.
Wow, this is breaking news but is it good or bad news? Madobemedia?
Mike Chambers also announced Flash 8 for the second half of 2005. Let us hope the merge won’t effect the Flash 8 release.
What else will be effected by this marriage?
FlashPaper vs. PDF
Freehand vs. Illustrator
Fireworks vs. Photoshop
Premiere / Aftereffects will force the Flash Video development?
But we could see this coming when you look at the Flash 8 preview from Aral Balkan. The new filter- and blend-features look like copied from Photoshop ![]()
Press news:
Adobe Systems Incorporated (Nasdaq: ADBE) has announced a definitive agreement to acquire Macromedia (Nasdaq: MACR) in an all-stock transaction valued at approximately $3.4 billion. Under the terms of the agreement, which has been approved by both boards of directors, Macromedia stockholders will receive, at a fixed exchange ratio, 0.69 shares of Adobe common stock for every share of Macromedia common stock in a tax-free exchange. Based on Adobe’s and Macromedia’s closing prices on Friday April 15, 2005, this represents a price of $41.86 per share of Macromedia common stock.
Norman Timmler from inlet media developed the open source tool FLVTool2 in Ruby to add metadata to an FLV.
The tool was primary developed for the new Riva FLV Encoder 2.0 released two weeks ago.
Main features of FLVTool2:
- batch processing
- custom meta information injection
- directory recursion
- can run at server side
With the added metadata the resulting FLV is in version 1.1.
There are two other tools FLV MetaData Injector from Burak and flv duration from swfx.org.
The advantage of FLVTool2 is that it is open source, server side with Ruby and of course custom meta information injection. This means you can add any name-value-pair to an FLV and read it out in the NetStream onMetaData-Event.
The Riva FLV Encoder e.g. adds the variable “encoder” with the value “Riva FLV Encoder”.
Default metadata added: width, height, duration, videodatarate, filesize, metadatacreator, metadatadate, videosize, audiosize, lasttimestamp, datasize, framerate, audiodatarate
With the new version of MTASC many things are improved but again you have to change some parts of your code where the compiler behaviour changed.
My changes to compile with 1.04:
mx/events/LowLevelEvents.as:212 -> “==” should be “=”
Add the following classes from DataSet.swc to your mx-classpath (rename swc to zip, extract, rename asi to as and remove packagename):
mx.data.components.datasetclasses.DataSetDataProvider.asi
mx.data.components.datasetclasses.DataSetIterator.asi
mx.data.components.datasetclasses.DeltaPacketConsts.asi
mx.data.components.datasetclasses.DeltaPacketImpl.asi
mx.data.components.datasetclasses.DataSetError.asi
mx.data.components.datasetclasses.DeltaImpl.asi
mx.data.binding.ComponentMixins.asi
mx.xpath.NodePathInfo.asi
mx.utils.ClassFinder.asi
mx.utils.StringTokenParser.asi
The changelog
- “for” optional first parameter and expression
- fixed while( o )++ i;
- added error when duplicate import statement (with same or different
package)
- added class-exist import check
=> import will now link classes
- fixed typing error with single “var” in a block
- fixed parser error with a?b:c and big left-expression
- fixed bug when catching “imported” exception class
- changed boolean operators typing
- added -flash6 for F6 compilation
- added -trace for custom trace function
- added optional color component for -header
ActionStep is an ActionScript 2.0 component framework for Flash. There isn’t published anything yet but the approach sounds just like a very nice solution. Instead of handling symbols and classes like the Flash V2 components ActionStep plans to handle all by code and by heavy drawing I guess. Focus of course another time for the opensource Flash compiler MTASC which I now mention in quite every post ;).
I am very excited about what’s going to happen with ActionStep and I would appriciate a mailing list which isn’t available yet at there sourceforge page.
Anyway - the upcoming opensource tools around flash are a big hint that there is a gap between what’s Macromedia offering today with Flash MX 2004 Pro and what developers have in mind and like to be solved better / another way. Otherwise the opensource community around flash won’t grow up so fast. Is it time for 8Ball or for a complete opensource Flash/SWF solution?
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.
The open source tools around flash are growing:
swfmill can convert swf to xml and backward. I just tested it with a simple jpeg in a swf and it worked as expected.
From the README:
swfmill is a tool to process Shockwave Flash(TM) (SWF) files.
It can convert SWF from and to an XML-dialect called “swfml”,
which is closely modeled after the SWF file format.It also provides a libxslt-based XSL transformator that
supports an extension (”swft”) which helps with generating
IDs for SWF objects and can import an SWF as XML using an
XPath command (swft:document()).As a simple application of such functionality, swfmill can
pack together a bunch of media files (currently only jpeg
and other SWFs) into an SWF as “library objects” for your
attachMovie() pleasure.
swfmill is open source (C++) and published under GPL license.
The author has focus on building container movies for mtasc.








