Great video about an important topic (german)

RetteDeineFreiheit.de from alexanderlehmann on Vimeo.

i don’t care if you vote

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

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:

  1. Via addCallback(”func”, asFunc)  – You can register a function twice
  2. 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.

pagepointer: buzzimage

buzzimage
link

Nokia AR concept

via

another great 3d engine

The engine looks really nice. Unfortunately I couldn’t find a “switch to english” button on the website.

infinity3d-engine

http://infinity3d-engine.com/ru/

light graffiti

lightgraffiti

link

who are you?

personas

Personas shows you how the internet sees you.
personas

« Older Entries

Newer Entries »