Update 2007/05/23: I’ve found a better way of dealing with legacy lmc_tween code.
Maybe a little harsh, it’s definitely frustrating though.
Since I started my new job in November I have had to deal with legacy code left behind by the previous Flash developer.
I’m not one for working with another’s code to start with. I always get an itch to redo from scratch about a quarter of the way in, but time waits for no redevelopment. I end up hacking at code till it limps in the right direction.
The previous developer had a taste for lmc_tween.
One of lmc_tween’s pitfalls is that in order to use it to extend MovieClips you need to replace Macromedia’s core classes. Which means every person in the workflow who has to work with it needs to know about this, and mess with their core classes. This leaves me feeling uneasy.
Of course the previous developer extended his MovieClips in every project — it’s a natural way of working with objects.
And of course the above method works only in Flash MX 2004. Flash 8 just spits out errors and does no tweens. I have always managed to work my way around this, but tonight I decided to find a proper solution.
After lots of googling I found a very simple answer. Put the location of the two classes you need to replace in your class path:
Preferences > ActionScript > ActionScript 2.0 Settings
C:\Documents and Settings\user\Local Settings\Application Data\Macromedia\Flash 8\en\Configuration\Shared\zigo
This way your core classes remain untainted and the tweens bounce about happily.
This does not help the designers on their Macs, though. I’m going to investigate the possibility of not having to install the extension. Trying to explain to client how to install lmc_tween over the phone is an enriching exercise.
If you’re looking for programmatic tweens — the newer and friendlier Fuse Kit reigns supreme at the moment. It uses the same Zigo engine and Penner tweens as lmc_tween.
You do not have to install the extension, just place the classes in your source directory and import the classes normally. That way you can package the Fuse classes with the project anyone who comes into contact with it can build it without jumping through any hoops.
It can do more than that though, Fuse is a sequencer…