A code monkey randomly typing on a keyboard for an infinite amount of time will almost surely produce brilliance (almost).

Oldie but Goodie: Flash Extension for Converting Bitmaps to Symbols

Posted: October 8th, 2009 | Author: Huyen Tue Dao | Filed under: Development | Tags: , | No Comments »

Side project that I’m working on involves hundreds of inventory items each with several images per item as well as several resolutions per image.  As part of an all-encompassing issue of how to optimize image storage/loading/caching within my wittle Flex app (suggestions and comments wildly appreciated), I came across a fairly old (2006ish) but useful extension for batch converting bitmaps in a Flash library to symbols, including some filename manipulations, other options.  If someone has a better solution for this particular task, please, please, let me know about it, but otherwise, this is pretty handy. O.o

Ben Clinkinbeard’s Flash Extension for Converting Bitmaps to Symbols

As an aside, Ben Clinkinbeard’s blog looks great.  /add to rss feed


Speed testing/time measuring in .NET, AS3

Posted: March 14th, 2009 | Author: Huyen Tue Dao | Filed under: Development | Tags: , , , , , , | No Comments »

Having had to run some (slightly painful) speed tests as part of a code re-factor for work, I googled a couple of new ways to run speed tests that seem better and are cleaner than the typical method of instantiating Date-type objects at the start and end of the timed code.

.NET: Instead of using DateTime.Now or even instantiating any DateTime objects, just use System.Diagnostics.Stopwatch.  The overhead is much less, since Stopwatch makes use of low-level API.

AS3: The getTimer() function in the flash.utils package returns the number of milliseconds since Flash Player initialized.