Digital Paper Revolution

Tag: actionscript

SWF Scaling and Content Alignment

I want the past two hours of my life back. Real quick, it turns out that in AS3, fscommand("allowscale", "false") messes with the

Stage.scaleMode = StageScaleMode.NO_SCALE;

AS3: Singleton

I don't think this trick is all that special, but I've been told I should put it on the internets. ActionScript does not allow for private constructor functions, thereby preventing a pure implementation of the Singleton pattern. This is my way around it:

AS3: References by Interface aren't Objects?

It turns out when you typecast an object as the interface it implements, you lose the fact that it's an object. What up, team ActionScript?

AS3: Dynamic Instantiation

I know this trick is well documented already, but I figure the more it's out there, the easier it is to find.