Get $500+ of the best After Effects files, video templates and music for only $20!
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.

Thinking in Commands: Part 2 of 2

Thinking in Commands: Part 2 of 2

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

During this tutorial we’ll further extend the command framework from the first part. We’ll create a scene management framework, with easily understandable and maintainable code.

Loading Data with Commands

Loading Data with Commands

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

It’s very common to load external data (such as SWF files) during runtime, but only when the data is completely loaded can we read or manipulate its content. Usually we have to listen to the complete event dispatched by a Loader or URLLoader object that loads the data for completion handling. Oftentimes, we write code that loads the data in one function, and write code that handles the completion of the loading in another function, but this can be improved by grouping the whole loading process together..

Managing Sounds with Commands

Managing Sounds with Commands

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

Sound management is very important for many types of Flash applications, such as interactive websites and games. As long as you want to deliver a rich interactive experience, you might want to consider making use of sound effects and background music. In this tutorial, I’ll present a minimalistic sound management framework that manages sounds into sound tracks. And I’ll show how to integrate the sound framework with the command framework from my previous tutorials.