Many people use the Macromedia Flash MX V.2 Components to create user interfaces for their flash applications. Since Open Source UI frameworks (like ActionStep) aren’t released yet, Flash Developers have no worthy alternative in choosing the most comfortable and functional UI library with which to satisfy all their needs. Another issue is the absence of UI builder tools for existing Open Source frameworks. Consequently, Flash developers are often forced to use Macromedia’s UI framework.
However, because of the extremely poor quality of the V2 Components source code, it’s practically impossible to use it together with other open source tools. One of the most prominent issues is not being able to use MX source code with the MTASC SWF compiler. The coding standards used in the V2 Components code are incompatible with those of MTASC so its parser produces numerous warning and error messages. But even updated MX code compiled with MTASC won’t make SWF work properly. Because of differences in class registration order and using initialization code from assets inside SWF’s library, component skins are initialized incorrectly. As a result components may be displayed only partly or not at all.
So currently it is not possible to use MTASC to compile a SWF that uses the Macromedia V2 Components. MTASC has a special -mx option that allows the skipping of MX classes during SWF compilation and leaves it as is. But in practice, the inability to properly compile MX classes with MTASC makes its use inconvenient and seriously limits the area of its application.
Provided patch serves for two purposes:
So using this patch Flash Developer could feel the power and freedom of the open source development applied to MX solutions framework.
Patch can only be applied to MX sources distributed with Macromedia Flash 8.
MX sources published with Flash 8 are different from sources distributed with Flash MX 2004. It contains missed packages like services and xpath. Also sources are updated and rewritten a little. So it made possible to patch it and makes compatible with MTASC.
Patched MX sources could be used to recompile not only SWF produced by Flash 8 but also SWF published using Flash 2004.
Also you need to install Macromedia Flash Remoting MX Components in order to have complete classes collection on your computer.
Because of Macromedia Flash License Agreement, it’s impossible to publish patched MX sources. So below you can find patch files produced by DIFF tool and instructions how you can apply it to your MX sources.
Copyright the original author or authors.
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and limitations under the License.
In order to apply this patch you need to download and install ANT (cross-platform, requires JRE) or get PATCH utility. PATCH utility is a standard UNIX tool. Microsoft Windows users could download ported version from GnuWin32 site. For OCX users PATCH utility is available within so-called “Developer package”.
Installation instructions could be found here:
All patches are grouped into 3 categories:
Each category contains a set of patches allowed to update original sources to any released patched version. Also it’s possible to update some particular patched version to any subsequently released version.
Below are the tables contained all released patch versions.
| Version | Original | Subsequent |
|---|---|---|
| 1.0 | to 1.0 | - |
| Version | Original | Subsequent |
|---|---|---|
| 1.0 | to 1.0 | - |
| Version | Original | Subsequent |
|---|---|---|
| 1.0 | to 1.0 | - |
| 1.1 | to 1.1 | 1.0 to 1.1 |
Before using patch it’s strongly recommended to backup your original Flash source files. Also it will be better to create local copies of the Flash Core and MX directories and apply patch to. Then you could edit CLASSPATH settings for MMC, MTASC and used IDE to use patched copies instead of original sources from the default location.
For the various OS you could find required sources at:
I’m not familiar very well with UNIX and OCX systems. So please contact me to help to complete this section with Flash sources location for this OS.
So, for example, create ”C:\Flash\lib\Macromedia” folder and copy FP7, FP8 and MX directories to. This example will be used below to illustrate how to apply patches.
IMPORTANT NOTE: Using Copy/Paste on patch execution strings can lead to patch failing with message patch: ûd: extra operand. In this case please type execution string manually.
Comming soon...
You don’t need to modify your source code in order to work with patched MX classes. But there is one significant requirement. You need to force compilation of the mx.core.ext.UIComponentExtensions class into your SWF file. It could be done with 2 different ways:
private static var incExt = mx.core.ext.UIComponentExtensions;
mtasc -cp ./src -cp C:/Flash/lib/Macromedia mx/core/ext/UIComponentExtensions -main MyMainClass
And it seems that’s all. Enjoy the patch!
For more detailed information, issue reports, participation proposals and etc. you could contact:
Also you could use MXPATCH project page at SourceForge.net to commit bugs and request improvements.