Crafting Code & Wood: A Maker’s Journey

  • Oh hi there!

    It’s been a while and I’ve been a busy bee. From canvas stuff with EaselJS to developing multi-platform games from Flambe in HaXe I’ve been learning all sorts of new things. I’ll be posting new tidbits of info and nuances about these things that I’ve been learning over the past year and hopefully it’ll help […]

  • Helpful snippet for me at the moment

    Here’s a handy little code snippet. Need to append the placement of a number? Use this! private function getNth (num:Number):String { var qn:int = ((num%100) / 10); var rn:int = num % 10; var suffix:String = “th”; if (qn != 1) { switch (rn) { case 1: suffix = “st”; break; case 2: suffix = […]

  • Seeing the android API source code

    So looking for all sorts of random things for my current android project I ran across Google Code search. Holy toledo is it great to be able to see the logic (or seemingly illogical things in some cases) that google has behind their APIs. Check out some of the android source HERE Damn handy! Though […]

  • Android timer stuff

    Wow, it’s been a while since I’ve last posted! Just wanted to toss up some code for creating a timer in android. One would think you would just utilize the java.utils.Timer class but that creates a new thread and can create issues with your application. Plus it’s a pain to access stuff from the timer. […]

  • code reviewing and tons of debugging info!

    In the last month or so I’ve been tasked with reviewing a project for performance profiling and just code cleanup in general. It’s been quite a task as I wasn’t familiar with a single part of the code so finding tools to aid in this is uber helpful. With that in mind, here are a […]

  • Uploading multiple images/data to server!

    Oh man what a life saver this was! Super easy to implement and works awesomely so far! Multipart form data in as3 [Class version 1.2] Implementing is as easy as this: jpgEncoder = new JPGEncoder( 100 ) var photo:ByteArray = jpgEncoder.encode( this.getBitmapData( photoBitmap) ); var thumbnail:ByteArray = jpgEncoder.encode( this.getBitmapData(thumbnailBitmap) ); var ml:MultipartURLLoader = new MultipartURLLoader(); […]

  • setting properties at runtime from xml or css

    Mainly this is just a post to remind myself in later times about this code snippet but basically this will work with any class with accessible variables. Take an xml node such as You can use this snippet to parse through those attributes to set all of your variables for you assuming they exist in […]

  • Flashbuilder 4 issues with generating components in Flash CS5

    I ran into an issue today that was bugging the crap out of me. I kept trying to make graphical components within flash that I could use in a flex project I’m currently working on but whenever I would run the project after embedding them in my library swc I would get this error: Illegal […]

  • Nice conditional coding tip

    Tyler from FCNY turned me on to a nice tip on conditional coding. Let’s take for example we have a variable that we need to associate with another variable. For instance, we pull in some flashvars and need to check if these exist and if not give them a default value. Let’s look at a […]

  • Handy code snippets plugin for Flex/Eclipse

    For all of those unaware of snippets, these are code shortcuts to increase coding productivity and are damn handy. For an extended idea of what you can do with these visit this blog post I ran across: On a side note, the poster doesn’t tell you how to install CFEclipse so I’ll just touch on […]

Got any book recommendations?