« JSFL: Arrange Library | Main | Turkish Locale for DRK 6 Formatting Library »

January 31, 2004

Peter Hall Strikes Again

Peter Hall's last two posts are too full of good info not to have a reference here. (Feel free to ignore this post if you are reading this in an aggregator).

The first one is about AS2 class size limit, which is about 32k, because of the fact that AS2 classes are wrapped in IF blocks and IF blocks have this limit as they are implemented, according to the SWF specs. [This is a post I might have had here, so make sure you read it if you like the kind of info I post here].

Flash MX 2004, warns you about this, if you have a class that is too big to fit in an IF block, which is a very good thing. Gary Grossman, the guy who wrote the foreword for Colin Moock's 'Actionscript for Flash MX The Definitive guide', and who is also the creator of actionscript :), replied about this at FlashCoders mailing list.

'I'd say a rough rule of thumb is that a class should be less than 2000 lines. We have a number of classes in the mx.* packages that are around 1500 lines, like the UI components in mx.controls.*, and we never ran into that message.', ' It would be better to architect the application so that classes are not excessively long. Excessively long classes are not a great practice anyway.' says Gary, which is plain good advice as you would expect from him.

The second post, which attracted much more attention and quite a trick, is about creating 'classed stage objects with an empty library'.

'The beauty of this is that you don't need to add a symbol to your library in order to include a component; you can just use the class and the component will follow. This is a big step to free class code from being too reliant on FLAs.' Peter states.

Dave Yang says 'Even though it is late Friday/early Saturday, I've got to write this one down' in his blog, and has a shorter example.

Jesse Warden, AKA JesterXL, suggests that this should be submitted to Oh'rizz-neily's Flash Hax (see moockblog about this).

Ralf Bokelberg, posted an example that doesn't use any library symbol at all.

I won't deny that I was pleased to see that Peter mentions ASV in both of these posts. This also shows how ASV can be used without even being considered as a hacking tool...

January 31, 2004 in Flash | Permalink

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c73d553ef00d8345601b269e2

Listed below are links to weblogs that reference Peter Hall Strikes Again:

» Peter Hall: ActionScript Hero of the Month (January 2004) from ActionScript Hero
Peter Hall: ActionScript Hero of the Month (January 2004) See details here.... [Read More]

Tracked on Jan 31, 2004 10:55:19 PM

Comments

Post a comment