7.19.2011

build decay chronograph

After hours of coding and reloading, I constantly forget whether I reloaded a browser tab under development, and otherwise question whether the SWF actually got rebuilt (and am often wrong on both counts).


Enter the BuildDecayChronograph, an object that shows you how long it's been since a given SWF was last built, and a quick visual indicator from green to red of how fresh it is (for me, 5 minutes). The only requirement is that the given SWF was compiled with mxmlc.

Usage:
addChild(new BuildDecayChronograph(5*60, 'engine'));

Download from GitHub.


This could not have been done without the brilliantly hacky org.igorcosta.hacks.SWF
Blog Text and Codes (Igor Costa ) / CC BY-NC-SA 3.0

No comments: