Snippet Saturday: isRoughlyEqual() PLUS: as3-utils

by

Last week, I started a (hopefully) weekly post where I throw out a (hopefully) useful piece of code for people to (hopefully) use in their projects. I’m calling this #SnippetSaturday.

John Lindquist commented almost immediately that there is a project on github designed to collect these sorts of useful little snippets of code. It’s called as3-utils. Check it out!

This week’s snippet, isRoughlyEqual(), provides a simple way to find out if two numbers are in the ballpark of each other.

I’ve added it to the as3-utils project too.
http://github.com/mimshwright/as3-utils/blob/master/src/utils/number/isRoughlyEqual.as

Tagged , ,

Snippet Saturday: limit() function

by

So I’m sitting on a bunch of pretty useful code and I’m not sure how to share it with people. I could create a massive library that combines all the miscellaneous bits into a single, poorly documented library, but after looking at the Flash Game Dojo’s wiki, I’m starting to believe more strongly in the idea of releasing code in smaller pieces that achieve a particular function. So, I’m going to try to kick off this idea of #SnippetSaturday. I’m sure I won’t manage to post something every week but I’ll do my best. If you’ve got a blog or just twitter, I’d encourage you to join in too!

Anyway, here’s my first contribution. It’s a simple little function that limits a number between an upper and lower limit.

BTW, I used gist.github.com for this but snipplr is good too. If you know of others, leave a comment!

Tagged , , ,

I finally got with git(hub)

by


It’s probably been more than a year that people have been telling me to start using github. While, I’ve certainly followed a few cool projects on there, and I’ve wrestled to get git working on Dreamhost, and I’ve even done some command line work with the repository, I haven’t yet set up a new public repository… until today. I just put up a mini-library for doing Abstract-like classes and methods in AS3 (previously written about on this blog) called simply enough, AbstractAS3.
So please feel free to take a look. This time, instead of commenting on how you would improve the code, you can just fork it and do it yourself! Enjoy.

PS. I’m hoping with the next version release of KitchenSync to move it from google code to github (UPDATE: This is done! KS on Github) to encourage more collaboration.

Tagged , , , ,

All about Flash Versions

by

Here is a really great article by Senocular about the different versions of the Flash Player, authoring tool, ActionScript, Flex, SDK, compiler, etc. The whole thing has gotten so complex that we really need something like this to keep track.
http://www.senocular.com/flash/tutorials/versions/

Tagged , , , , , ,

Simple Flow Chart for a “Simon-Says” Memory Game

by


This is just a quick little flow-chart. A project I’m working on includes a ‘Simon-says’ type game. I thought I’d share my notes on how the game logic will work.

Update: Here’s my quick prototype (before skinning)

Tagged , , , ,