i don’t care if you vote
September 13th, 2009 • offTopic • 2 comments
But I care about my rights, especially when someone tries to restrict it (on the internet). I also think that there should be more know how about the whole WWW in our government. That’s why I support “Die Piratenpartei” for the upcomming election in Germany. Obama is kind of a geek so why souldn’t we have a geeky party? You can find a banner here or just create your own one and submit it.
Handling Javascript in AS3
September 10th, 2009 • general • 2 comments
Handling Javascript calls via Actionscript 3 and ExternalInterface is cool. But in larger projects I’d like to have more controll over it. I spotted some things I didn’t like:
- Via addCallback(”func”, asFunc) – You can register a function twice
- You can’t see how much js calls / callbacks you’ve registerd and how often the were called.
So I wrote a small Singleton class called JsHandler which can deal with that issues. You can register callBacks and do Javascript calls. Furthermore the class provides two methods which report about the calls. A basic Error Handling is implemnted too.
I know I did a nasty hack for the …rest params. But I think it’s a good Solution for the problem. Noone needs more than 6 params in a Javascript function ;)
Update:
Thanks to lab9 for the apply and unshift hint. Now you can push as much params as you want to. I updated the class. The trick is:
// function name (string) args.unshift(jsFunctionName); // ...args ExternalInterface.call.apply(instance, args);
Here is the Democode:
JsHandler.addCallBack("sendToAs", fromJs); // Second one causes error (same name) JsHandler.addCallBack("sendToAs", fromJs); // returns the js return value as string JsHandler.doCall("sendToJs2", "p1", "p2"); JsHandler.doCall("sendToJs2", "p1"); // returns array of all callbacks JsHandler.allCallBacks(); // returns array with all methodnames // and call amount JsHandler.allCalls();
The class is just roughly tested and might contain errors. If you’ve any feedback or questions don’t hesitate to ask.
another great 3d engine
September 8th, 2009 • 3d, flash • 3 comments
The engine looks really nice. Unfortunately I couldn’t find a “switch to english” button on the website.

who are you?
August 27th, 2009 • creative, information design • No comments

Personas shows you how the internet sees you.
personas
head tracking plus anaglyph
August 26th, 2009 • computervision, nerdlab, papervision3d • No comments
![]()
activate your webcam, mouse drag to draw a rectangle around your face -> test it
and here are the credits:
Hm maybe someday I actually start writing about the things I post, but not now. It’s beer time ;)

