Archive for the 'Codetorials' Category

Codetorial: Associative versus Traditional arrays in Flash Actionscript (Cursorize)

In a recent Flash animation that I updated featuring various mouse cursors, I used an associative array to represent each cursor.

 You can view the Flash here at Newgrounds: Cursorize

What an associative array allows you to do, is create key-values pairs where you can create your own array indices (keys)and assign them the appropriate value. Associative arrays differ from traditional arrays in that associative arrays allow you to index an array with something other than an integer. Normal arrays use integers starting at zero to index them. This is completely fine, but sometimes you want an index with a more descriptive and meaningful name than just 0, 1, 2, and 3…and so on.

Continue reading ‘Codetorial: Associative versus Traditional arrays in Flash Actionscript (Cursorize)’

Codetorial: Translating the Tic-Tac-Toe Playing Board to Flash Actionscript

Here is a link to a Tic-Tac-Toe game that I created using Flash and its programming language Actionscript: http://www.constantlimit.com/site/portfolio/flash/tic_tac_toe.html

This codetorial requires a solid understanding of basic programming concepts along with Actionscript.

The playing board is a 3×3 grid that consists of 9 spots. Each spot can hold a piece, and X or O. Intially, each spot is empty since no piece has made any moves yet. So at any point in the game, there are three possible statuses for each spot, X, O, or empty.

Click the link below to continue with this codetorial:
Continue reading ‘Codetorial: Translating the Tic-Tac-Toe Playing Board to Flash Actionscript’