[AS3] Input

In the efforts to unify the AS3 libraries i realized that writting too many files (each file is specific for one functionality) though very clear and easy, maintainable is a big issue. I usually need to bring the whole library, which caused conflicts to another project when there might be other versions of utils classes (btw, i used to put package’s function for each utility) happen to be there. This caused too much headaches as the old ones will might not work the way we expected with the new ones, overwrite is not an option, especially when the classes was patched for bugs in different projects. Of course, life should be easier if you track down everything you modified to a class got used in the real project or got simple unit test for each file, but still, the portability is not that great.

One class for one thing should be the way to go, though it’s heavier in term of code base, the maintainable process should be easy enough, just move it somewhere, rename the package once if needed. No missing or conflicted dependencies to worry about …

One cool thing in this version is that you don’t need to cancel out theme configuration : if a state used bold = true, we don’t need to cancel out for other state, aka, doesn’t need to put bold=false for each other states. Another one is that we can do input configuration from timeline.
Continue reading


Batch publish .fla files

JSFL is the way to automate tasks in Flash CS IDE, you can write extensions to do the repeating works like export fonts, open files, create symbols, read graphics datas, build multiple .fla files … The one thing i got astonished about is that there are no built-in way (no jsfl api) to know if there are errors during compilation of an .fla file. Hit ctrl+enter, you see that even if there are errors in code, the Flash IDE still trying to launch the .swf file. Hit build from an .flp project, the compiling process won’t stop when errors occurs for files, it just clear the log everytime a new file need to build, so we end up with a bunch of errors in files which we never where they are to apply the fixes.

I don’t know how hard it is for the Flash CS team to add an api allowing us to catch and stop when there are errors building .fla file, but this surely make enough troublesome for me : Once there are errors, i need to wait for the batch building complete then compile one by one manually… so finally decision, there must be a way to do it in jsfl.
Continue reading