Is common courtesy an outmoded concept, superceded by technology?
We’ve all sat there, angered and galled by arrogant, solipsist twats, playing tinny music from their phones.
There’s never a handy baseball bat when you need one, is there
Now it seems there may be salvation on the horizon – DMP or ‘Digital Manners Policy’.
Microsoft has recently filed a patent for DMP, which is intended to work similarly to the RFID (proximity activated) chips that we see in shop alarm systems, etc.. The idea being that public areas like hospitals, cinemas, aeroplanes and (i pray) public transport can automatically switch mobile devices into standby, flight or silent mode. Thereby avoiding the need for public beatings, ABH and destruction of personal property
Fun little (ahem) viral project for the Terrence Higgins Trust to promote awareness in HIV+ gay clubbers who indulge in recreational drugs as to their effect on whatever HIV meds they may be taking.
Finally got some down time here at work and figured I’d have a poke around in this Papervision stuff.
Have always managed to stave off working with 3D in the past, but from what I’d seen of it, Papervision looked like it had made the whole process a hell of a lot simpler and more manageable.
Found a few really good resources and did a few demos:
Took a trip down to the Gloucester Cheese Rolling event near Cheltenham yesterday. Drenched, muddied and exhausted from half-running up the hill, we managed to squeeze through the crowd to catch the last official race.
There we a couple of unofficial (sans fromage) runs after that, so our voyeurism was sated and I got some great snaps
Nothing too special about this project. There’s some nice, balanced HTML/Flash integration demonstrated in the expanding flash menu that sits over the other HTML/Flash main content.
One nice feature is a Local Connection controlled auto-pause of the in-page videos whenever the flash menu is opened – and subsequent resume when it closes. The idea revolves around a satellite and controller system – the in-page videos register themselves with the menu (the controller) and then listen for events from the menu.
Found a nice way to use uints’ default value to my advantage. Have started using them for all my identifier constants in my apps. As they default to 0 (zero) even when uninitialised, as long as I make sure all my constants have a minimum value of 1, all I need to do is set up a global NULL constant of 0 and compare any class properties to that.
I can test properties regardless whether they’ve been initialised or not, so no more looking for nulls or empty strings, etc.
[as]public static const NULL:uint = 0;
public static const STATE_LOADING:uint = 1;
public static const STATE_LOADED:uint = 2;
public var state:uint;
//check state before it has been set:
trace( state == NULL ); // true – not inititalised [/as]
Always a particularly uncomfortable stone in actionscript’s boot, dynamically loading fonts at runtime has always been difficult. Many of my projects in the past have used library fonts as runtime shared libraries from the standpoint that once downloaded, it’ll be available across projects. It was never the cleanest of solutions and besides, the entire font had to be loaded – no choosing which character sets to embed, it was all or nothing.
This didn’t solve the problem of catering to markets that required special fonts that supported either greek or east asian character sets. I once got round the problem with one of our jaguar sites by an elaborate level loading process that I forget now and probably couldn’t explain any more .
Enter AS3 and the magical getDefinitionByName() method. With it, you can retrieve and instantiate classes as long as you know their fully qualified class names. Yes – even from loaded SWFs.
From there, all you need do is embed a font (explicitly specifying the unicode ranges of character outlines that you want) into a class inside a SWF, load that swf at run-time and extract the font from it. Add it to your main SWF’s fontlist and it’s instantly available to use!
Granted, I may have simplified my description a tad, but those are the essentials. In my latest AS3 project, my initial setup loads a config XML file, a localised copy file, a CSS styles file and a handfull of fonts needed to render the text within the app. Should I need to configure the application for the Japanese market for example, I can completely reconfigure the app and it’s fonts to support the Japanese characters without republishing.
Now that’s how it’s supposed to be!!
Check these articles out for a more detailed explanation:
Was messing around today and came up with a little bookmarklet to create a new Calendar event.
I’m sure it could be greatly improved upon, but for a quick click thing, it’s pretty useful. It takes the Title of the page as the event and prompts you for a date/time. Haven’t tested it without being logged into my google account, so no guarantees there
Create a new link in the links bar of your browser and paste the following javascript as the URL. (note:IE will say something about the protocol, but just ignore it)
javascript: function pad(d){ return d<10?”0″+d:d; } function gdate(d,t){ var da = d.split( “/” ); var s = da[2] + pad(Number(da[1])) + pad(Number(da[0])); if( t ) { ta = t.split( “:” ); s += “T” + pad(Number(ta[0])) + pad(Number(ta[1])) + “00Z”; } return s; } var d = new Date(); var date = prompt( “Enter Event Date (DD/MM/YYYY): “,pad(d.getDate()) + “/” + pad(d.getMonth()+1) + “/” + d.getFullYear() ); if( date!=null ) { var time = prompt( “Enter Event Start Time in 24 clock format (HH:MM):\n(leave blank for an ‘All-Day Event’)”,pad(d.getHours()) + “:” + pad(d.getMinutes()) ); if( time!=null ) { var gd = gdate(date,time); var w = window.open( ‘http://www.google.com/calendar/event?action=TEMPLATE&text=’ + document.title + ‘&dates=’ + gd + ‘/’ + gd + ‘&details=’ + escape( document.location ) ); } } void(0);
An old friend of mine that i basically learned flash with – who had given up the coding life – recently emailed me to let me know that he was getting back into Flash (and AS3).
We were hacking code out back in the days when the flash world was rejoicing at being able to enter free-text code into the actions panel for the first time and emulating the new-fangled ‘event-driven’ stuff was the latest thing . He ‘got out’ just before AS2 really kicked in, so essentially he now has to make the leap from AS1 all the way to AS3. That’s gotta be more than just a minor shock to the system!
Anyway, good to have you back, fella! Look forward to seeing what you get up to