2011 – The Year Everything Changed at FWA

Up until February 2007, FWA had almost entirely been awarding Flash websites. For 7 years, every day, a new Site Of The Day (SOTD) was being announced and it was always, almost completely, Flash deployed. The team at Ogilvy Singapore changed everything when they submitted Levi’s Copper Jeans and it went on to win SOTD on 21st February 2007. This site still stands shoulder to shoulder with the best non-Flash sites of 2011 and will always stand out as the seed of change at FWA.

For the next three years we saw the occassional plugin free site win an FWA but in 2010, the playing field was destroyed when The Wilderness Downtown landed on the FWA judges. The interactive short film immediately earned its place in FWA history as it went on to win Site Of The Year (SOTY) for 2010. Whilst raising a lot of eyebrows amongst some of FWA’s hardcore fans, I know personally and amongst the judges for SOTY that there was no doubt that Arcade Fire’s “We Used to Wait” promo site had raised the bar to a level we were not quite expecting.

2011… when everything REALLY DID change at FWA

Read more…

Category: Web

Window Focus and Blur

In working on the new Pantone Moods this week, I needed to add a listener to the widget to halt the realtime updates if a user no longer had the page active (meaning, they switched to another browser tab or application) to prevent unnecessary traffic to the server.

The application cycles through the ten most recent Moods posts and, upon nearing the end of its cache, queried the server for a new supply. However, if someone’s focus wasn’t on the page, it makes no sense to keep collecting and displaying results.

With ActionScript 3, this task is quite easy:

stage.addEventListener(Event.DEACTIVATE, onDeactivate);
stage.addEventListener(Event.ACTIVATE, onActivate);

And it’s just as easy when programming for Mobile Applications:

NativeApplication.nativeApplication.addEventListener(Event.ACTIVATE, onActivate);
NativeApplication.nativeApplication.addEventListener(Event.DEACTIVATE, onDeactivate);

With JQuery, we can now accomplish the same thing for AJAX/PHP browser applications to no longer commit resources to updating a page that isn’t being viewed:

$(function(){
	$(window).bind('blur', function(){
		onDeactivate();
	});
 
	$(window).bind('focus', function(){
		onActivate();
	});
	// IE EVENTS
	$(document).bind('focusout', function(){
		onDeactivate();
	});
	$(document).bind('focusin', function(){
		onActivate();
	});
});

Note that the second two methods must be added because Internet Explorer uses focusin/focusout rather than simply focus/blur.