Get $500+ of the best After Effects files, video templates and music for only $20!

Browsing Tag

commands

Thinking in Commands: Part 1 of 2

Thinking in Commands: Part 1 of 2

This entry is part 1 of 4 in the series Allen Chou's Command Pattern Tutorials

Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Activetuts+. This tutorial was first published in March, 2010, and is the first part of a series.

Simple, maintainable code is beautiful. However, when we have a sequences of actions that need to trigger each other, our code can get messy, making it impossible to change later. The Command Pattern keeps things clean.

In this tutorial, I’ll show you how to create a minimalist AS3 Command framework, capable of performing actions in sequence, in parallel, or with a delay. You’ll lean how to use this framework to create a complex effect with simple and clean code.