Today’s article follows up on an article I wrote way back in August of 2009 about the order of operations when you use a class. In the original article I showed the order of field initializers and constructors. Today I’m expanding on that to show three more chunks of code that are run. Can you guess what those chunks are?
Archive for January, 2011
One of AS3′s strong suits is its ability to very easily use classes in a dynamic way. Every once in a while, this leads MXMLC to completely remove some of your classes from the output SWF and you then get some very strange behavior. Read on for some strategies for using dynamic classes without going insane.
Today’s article is a followup to an article (Cast Speed, itself a followup to Two Types of Casts) from September that continues to gather comments. Sharp-eyed reader fastas3 brought up a good point that warranted some further investigation into the topic. So today we’ll be taking yet-another look at typecasting in AS3 to try to unravel some of its strange mysteries.
Today I’m revisiting an article I wrote last August about conditionals:
if-else chains, ternary (
? :) operators, and
switch statements. In that article I showed that
if-else chains are about as fast as ternary operators and that both of them are 10-15% faster than
switch statements. Today we’ll take a look at how those conditionals scale beyond just the few cases in the last article.