More 3d text, this time in aliased flavor

Posted by HCL - RIA Group in

UPDATE: Apparently the .swf was missing… it’s there now. I realize many of you spent sleepless nights shredding your nails with ye sharp fangs. Crisis is now over.

This is actually the first experiment I wanted to do, but I got too excited about the anti-aliased one. Not much to talk about here, just runs through the pixels and represents them as Cube instances. This time I used Tweener for the possibility of “auto animating” :ooh: Reminds me of that crappy windows 3d text screensaver, except, I don’t have shading… Hopefully I’ll build the courage to install great white soon… Maybe I could be like the cool kids and add fire to it too ;)

There is some ‘flickering’ going on between the individual Cubes. If time permits, I’d like to optimize this to combine as many Cubes into “stretched” cubes as possible. I’ve got a bunch of ideas stemming from these two experiments, hopefully I’ll be blogging a plenty :)

AS2 to AS3 converter: createTextField, getURL handling

Posted by HCL - RIA Group in

Draft of the AS2 to AS3 converter. Try it here, download it here.

the actionscript parser portion of the class to get it beyond a simple list of regex calls and more towards a smart converter. New features include:

  • Updates createTextField to new TextField() syntax. Sets x, y, width and height if they are not the default (0). Uses addChildAt unless getNextHighestDepth() is used for argument 2, in which case addChild is used. Parses the first parameter and uses it as the variable name unless it is not a simple string, in which case a temp name is used, and the original name is shown in a comment on top of the block. Pretty sweet.
  • Updates getURL to new URLRequest syntax. Works as above.
  • Updates var, function and class to public var, public function and public class to remove warnings as requested by my childhood hero Robert Penner. Parses the class to recognize block depth to not affect local vars and inline functions.
  • Smarter class and package name recognition.
  • Removes unnecessary imports in the same package as the current class.
  • Should properly recognize various line endings (crossing fingers).

The zip now includes a command-line executable called convertas2as3 for those Windows users who don’t feel like installing PHP. The zip is pretty big because it includes the php libraries for Windows users. On other platforms you can run the command-line utility in src/convert.php by typing php convert.php at the command line.