PDA

View Full Version : Creating Tic Tac Toe


Tim_2008
12-10-2008, 09:29 PM
My semester is wrapping up - it's been my first exposure to flash and when I was starting out I wanted to really hate it. Now that things are winding down I am finding that flash has gotten under my skin. I am itching to try something else.

One of the projects we had to do toward the end of the class was create a game. My instructor was kind of enough to allow me to use a tutorial (Todd Perkins from Lynda - Memory Game) and while I understood a lot of what Todd was doing I found myself thinking that I would have a hard time coming up with the code on my own.

Well, now I want to try. What I am wondering are some of the things I need to think about before starting to create a simple tic tac toe game. Should I create a "bin" where X's and O's reside then drag them onto the play surface? Or, do I have flash recognize whose turn it is and somehow fill and empty MC with an X or O on the click? Basically, what kind of AS structure do I want to aim toward?

If this goes well I want to try something another game - Othello - one of my fav's from elementary school.

Thanks.

Tim_2008
12-10-2008, 09:31 PM
Crap - I just found this...

http://www.actionscript.org/showMovie.php?id=1432


I just looked at the code for this TTT..... EEK!

I should have done a google first - oh well, this is for other idiots like me.

http://www.flashperfection.com/tutorials/How-To-Make-A-Tic-Tac-Toe-Flash-Game-In-ActionScript-3-CS3-Timeline-73502.html

rrh
12-11-2008, 04:52 PM
That tutorial has a few bad habits, like using "mouseDown" instead of MouseEvent.MOUSE_DOWN or making a big switch statement to pick X and Y values based on one random number, rather than just having two random numbers, for X and Y. (Figure 5-3)

So I'm saying you can learn from it, but try not to take any of it as gospel.