Category: coding

  • 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 = […]

  • 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 […]

  • 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 […]

  • Dynamic class property retrieval

    I’m taking a break from the pattern tutorials for the moment to write the as3 facebook connect integration library I’ve been meaning to write. With that said, here’s a little method I didn’t realize was around to pull properties from classes. Normally the for..in method you can pull properties available within an object, but this […]

  • crossdomain gateway or “How can I get that data!”

    A lot of sites today are very open with their APIs allowing users from other sites to retrieve their data, but sometimes you’ll come across websites that may not have that same open access. When their sites limit the access that other sites can retrieve data from via the crossdomain file it’s frustrating to say […]

  • the down lo on ExternalInterface and javascript injection via actionscript 3

    Yesterday I did a presentation on ExternalInterface and it’s uses along with how to inject javascript on the page and a few other tidbits at FlashCodersNY. Here’s the zip file with the project we went over. Whether you were there or not you should still be able to easily follow along since there’s tons of […]

  • Javascript injection via as3 to embed external libraries

    On my quest to make the facebook actionscript connectivity as easy to work with as possible I needed to be able to reproduce the call in order for everything to work appropriately. After some searching I came across a clip of code that worked beautifully

  • Facebook chat update

    [Quick Update] I discovered there’s actually a class in the actionscript api called SendLiveMessage. Not sure yet if I can utilize this to listen for updates from facebook but it’s a start.

  • Not so recursive method annoyance fix

    Ok just first of all, I would like to point out that the method in my previous post was in all actuality not a recursive method. It loops through objects in that class but not the same object consecutive times.. my bad. On that note. Thanks to Hudson Ansley on the flashcodersny blog for pointing […]

  • Recursive method annoyance

    So I’ve been working on incarnations of a mapping application over the last year or so and am rather happy with how it’s been growing so far but one thing has come to my attention.  The map pulls in hotel properties and displays them as markers on the map depending on the x and y […]