ActionSnippet – AS3 tips and tricks
Posted: November 6th, 2008 | Author: John del Rosario | Filed under: AS 3.0 | Tags: ActionScript, Tips | No Comments »I’ve bookmarked this site. You should too! There are some very useful and helpful tips in there. Like the latest one, as of this writing, about simplifying multiple method calls to a graphic (or any) object.
From this:
mc.graphics.lineStyle(0); mc.graphics.moveTo(10, 10); mc.graphics.lineTo(20,10); //...
To this:
with (mc.graphics) {
lineStyle(0);
moveTo(10, 10);
lineTo(20,10);
//...
}
Much more readable and easier to type.
Check it out here and bookmark it.