Posted
on January 2, 2009, 23:30,
by stefan,
under
coding.
Using the trace() function output is written to the file flashlog.txt if the debug version of Flash Player is used.
Verify that you are running the debug version at this page, if not you may download it here.
Then the Flash Player must be configured to enable logging using the mm.cfg file. It’s location is OS dependent, as well as the (hard-coded) location of the resulting flashlog.txt file. Location and possible settings of the mm.cfg file are documented here.
Using Mac OSX or Linux a convenient way to view the log file is to use tail -f from the command line, e.g.:
tail -f /Users/<user>/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt
Posted
on December 15, 2008, 22:49,
by stefan,
under
coding.
I had some free time and wanted to bring back some early Amiga memories using JavaScript. Using canvas this is what I ended up with:

Click for demo.
I’m pleased the way the lightning and individual rotation of the bars themselves turned out to be. What do you think?
Posted
on December 15, 2008, 17:02,
by stefan,
under
coding.
When using ExplorerCanvas (excanvas) to emulate the Canvas object in Internet Explorer it might be a good idea to check that the excanvas lib really is loaded before trying to create a context object. If not, an informative error message may be displayed instead of some cryptic “object doesn’t support this property”.
Here is a way to check if excanvas.js has been loaded.
if (typeof window.CanvasRenderingContext2D == 'undefined' &&
typeof G_vmlCanvasManager == 'undefined') {
alert("ExCanvas not loaded!");
}
Posted
on December 9, 2008, 11:00,
by stefan,
under
coding.
Dear NetBeans, thank you for the courtesy of warning me, but why do you really ask? You don’t give me much choice, do you…?
Now submitted as bug #155031.
Posted
on December 5, 2008, 9:53,
by stefan,
under
linux.
Using Linux, to get the number of files in the current directory, use:
ls -1 | wc -l
To count the number of files recursively in the current and all directories below it, use:
find . -type f | wc -l