With web technologies generally, and flash specifically, managing cached assets can sometimes feel like walking a tightrope. If you’ve got a simple slideshow and have occasional updates to the image you want immediately reflected to the client, you’ll often see traditional “cache-busting” methods like appending a random number of the current UTC time to the […]

Despite the commonality of the classic easing equations, largely attributed to Penner, there doesn’t seem to be the in-depth examination of “how it works” that a lot of code is subject to nowadays. First, a quick clarification on the most popular easing Classes. The “standard” easing classes (that provide predictable inertia), are Linear, Quad, Cubic, […]

Just a quick note about how PHP conditional operators differs from ECMA (JS and AS)… The double-pipe ‘OR’ operator, in JS, evaluated to the value of the expression that is not false. In PHP, it evaluates to true if any any expression is true, or false if not (the output will actually be “1” if […]

In both JavaScript and ActionScript, creating a regular expression – even using literal notation – results in the instantiation of a new RegExp object. If you’re going to use a pattern repeatedly (which is usually the case) – cache your patterns! Just like you would any other object – “literal” doesn’t mean “free”. Simple test […]

The ECMAScript Date object accepts a string that it pretty generously tries to convert to a valid date. However, DATE and DATETIME returns from MySQL are formatted Y-M-D, which will cause new Date(str) or Date.parse(str) to barf. The quick fix is just to use a simple RegExp to move the year to the 3rd position. […]

There seems to be some confusion amongst the community as to the details of casting objects to a class. There are two ways to do this: 1. Cast using the constructor… Constructor(obj); 2. Cast using the “as” operator… (obj as Constuctor); There are subtle yet significant differences between these two approaches. The first – passing […]

ExternalInterface.available returns if the swf is in an environment capable of providing an external scripting engine – it does not detect whether JS is disabled. Here’s a quicky little function that will:

This behavior (dare I say: bug?) also relates to relative pathing when using a Video object’s load() method. See my post on that here. I’ll repeat some of the information found there, here. In AS3, normally an external file is pathed relative to the housing document (.html or .php, whatever). When supplying the url property […]