Ultra-compact crossfades with TweenLite

10th March 2009

I love TweenLite, Jack Doyle’s lightweight tweening engine. Its a bit of a cheat, but we’ve all got to have our little tricks and time-saving moves when deadlines are looming and your fingertips are melting.

I’ve just been coding up a short script to crossfade video stills as you flick through using a navigator. I won’t go into the full code, but let’s suppose you have an array of display classes that hold images, and you are just looping through them. If you have a function called say 'showImage' with one parameter 'state' which is set to true or false – depending on whether you want to show or hide the image – then with TweenLite, you can do this:

public function showImage(state:Boolean) : void
{
  TweenLite.to(this, state?0.5:1, {alpha:Number(state), visible:state});
}

And that’s it. What that means is that if you call 'showImage(true)' on one of your objects, it will have its 'visible' property set to true, and fade to full visibility in 0.5 seconds. If you call 'showImage(false)' on one of your objects, it will fade to alpha zero in 1 second (causing a nice overlap), then have its 'visible' property set to false on completion. Nice one, Jack.

If you haven’t that many objects, and don’t want to have to load up your server with a stack of calls to reload images, this is a cool little routine. If you want source code, just comment… I’ll see what I can do.

Edit: following a comment by @Justin Flash I’ve found there is an even quicker way…

public function showImage(state:Boolean) : void
{
  TweenLite.to(this, state?0.5:1, {autoAlpha:Number(state)});
}

This assumes the “autoAlpha plugin” is activated in your TweenLite constructor.

LOVE

6th March 2009

love-thumb

We are delighted to be working with Suburbia Media again, this time for the launch of their stunning new magazine for Condé Nast – LOVE. When we saw the artwork, it was such a joy. Yet again, it was a case of trying to create something that transparently presented the excellent work of Stuart Spalding and Lee Swillingham without getting in the way. The guys like Flash, so we just created a slightly more involved slideshow with a liquid layout and fullscreen option.

Orion Books Microsite

4th March 2009

Animals Are Not Rubbish (screenshot)

Just delivered the beta version of Animals Are NOT Rubbish for Orion Children’s Books.

The idea behind it is a competition where children have to make models of animals from recycled rubbish. They have support from Waterstone’s booksellers and the Born Free Foundation so it should be a good campaign.

It was mostly done in straight HTML/CSS, but we thought it would be nice to actually make the recycled animals idea in an intro sequence where rubbish was whipped up and moved around to make some animals. The end result is fun, and quite hypnotic. Thanks to Jack Doyle for the excellent tweening engine TweenLite which we used on the project and recommend.

The artwork all came from books by Lauren St John whose site we did last year. The artist, David Dean, has commanded great respect from all at G-RAFF for such lovely attention to detail, which made it easy to recycle the work for a website.

G-RAFF on Twitter

22nd February 2009

Steve Jones, creative director here. I have decided to start using Twitter because I just liked it from the first moment I saw it, in the same way as I instantly hated Facebook.

First thing I noticed was that the API situation for Flash was pretty woeful, so I’m writing a bunch of new “TwitterService” classes right now – starting from scratch – and will “tweet” the URL to the ZIP of AS3 files when I’m done. If anyone else fancies jumping in to develop them, that will be cool.

G-RAFF ON TWITTER

Manically busy at the moment, hence the sorry lack of updates. Moving into a new office next week, writing a killer PureMVC/PaperVision3D app for a big company you all know, working on a lovely trio of sites for Nigerian superstar Dare Art Alade, microsite for Orion Books, a great new community-funded film site, new stuff for Suburbia Media as they launched LOVE magazine, just about to go live with Bermondsey 167… the list goes on.

We’re also looking for freelance Flash developers if anyone is around. Familiarity with PureMVC will be a good help. Please don’t even launch your email client unless you are serious.

EDIT: Now 00:10 on Sunday night (no, its not Monday morning until I wake up) and I have just launched FlashTwitter as an open-source beginning to a decent Flash API for Twitter. I’ve had fun during the day, and hope this will be of some use.

Suburbia Media – Pop Intro

19th November 2008

Suburbia Media are celebrating 20 issues of their seminal fashion magazine Pop. They asked us to deliver a simple Flash intro which shows all the covers from the issues. So here it is.

More »