Thursday, March 17

Flash ActionScript 2.0

I went to the Minnesota Flash Users Group last night where one of the topics was OOP with ActionScript 2.0. The timing was pretty good since we've been reading Moock's Essential ActionScript 2.0 in our Flash Focus Group at the office. Unfortunately, due to time constraints, Steve wasn't able to get as far as he would have liked but I think it was still a great topic and Steve did a good job presenting; especially considering the HUGE range of experience in the room. His approach was to take the classic game of Snake and transform it from procedural code to OOP. He'll be posting the code out to the Flash MN Yahoo Group next week but let me know if you're not a member and would like to take a look at the final results.

One of my play projects with Flash + OOP was to build a "Traffic" demo with cars that you could interact with. As far as goals, I wanted to learn about/test:

Nothing too exciting, but you can take a look here. To start a car, click on it and it will start moving. Once a car has been selected, your "current car" will respond to key presses: left & right to steer, up & down to change speed. The buttons (start/stop/etc..) control all of the cars on the screen. Here are the two main class files I used as well:

0 Comments:

Post a Comment

<< Home