7/04/2011
Indeed. Why does this ordinarily quite burlesque and colorful blog suddenly look like the works of Jacob Nielsen?
If you are new to this blog; move along, but if you’ve come to expect bright colors and swirly shit all over the place, take a while and harken.
I need a project to get back to my former glory, and I need to deliver myself a prompt, swift kick in the rear to get going. The best way to do this is to just publish this new design for the blog while it’s still butt-ugly so that I’ll have an incentive to fix it the fuck up as soon as humanly possible.
If you really miss the old design go visit Kajas blog.
That is all.
24/09/2008
I realize that I’m late to the party with this, but so far all the examples I’ve seen have been a bit overkill for my needs, so I’m putting this out there in case someone else might have some use for it.
Of course,
is a Flash developers best friend. Hell, I sometimes feel I’d be happier if I never had to go beyond the output panel, but that’s neither here nor there. The trace statement however, as beautiful as it may be, doesn’t help you a lot when you’re debugging the project in the browser, and therefore Adobe created
to let you output the traces to Firebug. But calling
1
| ExternalInterface.call("console.log", args); |
every time you want to output something is a pain in the ass, and going through your code to change all your trace calls to ExternalInterface calls is an even bigger pain in the ass, and therefore developers created various methods to ease the pain. Here is the very lightweight solution I use myself.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| package no .martinjacobsen .utils {
import flash.external.ExternalInterface;
public class XTrace {
public static var enabled:Boolean = true;
public function XTrace (){ /*...*/ }
public static function log(...args :*) : void {
if(enabled == true) {
if(ExternalInterface.available){
trace("ExternalInterface is available")
for (var i :uint = 0; i < args .length; i ++){
ExternalInterface.call("console.log", args [i ]);
trace(args [i ]);
}
} else {
trace("ExternalInterface is not available")
for (var j :uint = 0; j < args .length; j ++){
trace(args [j ]);
}
}
} else {
trace("Set 'XTRace.enabled = true;' to enable traces.");
}
}
}
} |
As you see this class simply checks whether ExternalInterface is available, and if so traces the output to the console. If ExternalInterface is not available the statement will just be traced. As a bonus you can also set
to disable all traces if you don’t want to go through your code to remove traces, or go into the publish settings to strip them out.
Usage is extremely simplistic:
1 2 3 4 5
| import no.martinjacobsen.utils.XTrace;
XTrace.log("Hello World", 42, false, myObject);
XTrace.enabled = false; //Disable all traces |
26/08/2008
Probably only interesting if you’re based in Norway (yet, who knows?), but I thought I’d give you all a heads up that FUGN – Flash User Group Norway is starting up again after a lengthy summer vacation.
The first meeting is this coming monday, and the details can be found at the FUGN website (^^). If you’re Oslo-based; Get your ass over there.
7/07/2008
Since starting this (these) blogs I’ve had a minimalist interim theme while getting around to designing my own. Minimalism be gone! (I do suffer from hypomania after all.) Finally I got this theme release ready. It’s a work in progress of course, but good enough for now.
There’s a few validation errors. One from an empty menu of pages being generated that I’m keeping around for whenever I want to write some, and some stuff from posts which I’ll blame on WordPress. For the most part though, it’s all kosher XHTML/CSS.
I had a real hard time getting started on this template. I guess maintaining both design skills and code skills is kind of beyond me. As such I’ll happily admit that the swirly stuff in the header is a purchased stock illustration that I’ve modified and bent to my purposes. Once I had that as a starting point the rest of the design happened pretty quickly.
For now IE6 is not supported. Not sure if it ever will be. I might just redirect those unfortunate to the old bare bones template rather than break my balls trying to hack my code into something that little monstrosity is able to render. If anyone knows a good WP-Plugin that takes care of that for me; Give a shout.
So anyway. Just a FYI. Carry on.