Category Archives: Snippets

Grid generator for

Here’s a snippet of code that creates a grid in the <canvas> tag using JavaScript. It’s just a quick little experiment but I thought I’d share it with you. I added the draw command to a loop that moves around … Continue reading

Posted in HTML5 / JavaScript, Snippets | Leave a comment

SnippetSaturday: Number to String

This is some code I wrote a long time ago back when AS3 was just starting to show up on the scene (I updated it some to work on its own and to use crazy nested Vectors). I’m sure it’s … Continue reading

Posted in Snippets | Tagged , , , | Leave a comment

Snippet Saturday: quick random choice

Today’s Snippet Saturday (actually, Sunday) is a quick shortcut for choosing one of several strings, objects, etc. randomly. Now, I wouldn’t really recommend using this code in a project. There are ways to do the same thing that are much … Continue reading

Posted in AS3, Snippets, Tips, Tricks, and Hacks | Tagged , | 2 Comments

Snippet Saturday: isRoughlyEqual() PLUS: as3-utils

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 … Continue reading

Posted in AS3, Snippets | Tagged , , | Leave a comment

Snippet Saturday: limit() function

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 … Continue reading

Posted in AS3, Snippets | Tagged , , , | 3 Comments