Category:Images

A sunset time-lapse

I went on an old-school family holiday last week, and took the opportunity to capture some of the lovely Scottish scenery. It was Kirkcolm, in the Rhins of Galloway, and I shot a time-lapse of the sunset from the back deck.

After some experimenting I settled on one shot every 5 seconds, left it on manual and set it to initially overexpose quite a bit, to get the most out of the foreground, at the expense of the sky and with the hope of greater longevity as the light went.

I shot in raw so, with relief, I was able to recover a lot of the blown-out detail from the sky. I settled on a group of raw import settings that worked well for the first few images I looked at, then set them up to batch-process in Photoshop. When I went to sequence these in After Effects though, it left the latter end of the sunset too dark for too long, so I ended up deriving a new group of settings that brought the most out of the under-exposed end of the sequence. Finally I lined the two sequences up and faded the brighter version in gradually, as though the exposure had been adjusted manually during the capture.

The flickering specks you can see are (I’m told) swifts and some other small birds, who were nesting (and swooping maniacally) in and around the house. They are a little distracting but I haven’t yet had the heart to content-aware them out. Please sir, they’re only little.

Replacing the buttonMode hand cursor icon in FP 10.2+

Thought I’d share a little snippet from a project I worked on a month or so back – it takes advantage of the Mouse.cursor property introduced in Flash Player 10.2. MouseCursor, as you may know, beats the ass of previous cursor replacement solutions because it modifies the OS pointer, and thus is not at the whim of slow stage framerates or the various other painful snags that come with faking it; hiding the system cursor and manually positioning a graphic in its place.

There’s a decent amount of documentation out there on how to use it, but my specific requirement was to replace the cursor only when mousing over buttons and other clickable items. I wanted it to show up wherever the hand cursor would normally appear, across a whole project.

This is the kind of behaviour I needed:

catswitch
Click to run the example. The buttons show a custom mouse-over cursor only when they’re enabled.

Now, if you look at the Adobe docs on the topic, you can register a cursor by passing in a String constant and a MouseCursorData object like so:

Mouse.registerCursor("PointerCursor", mouseCursorData);

Additionally, you can spy a number of static String constants inside the MouseCursor class – such as IBEAM and HAND – which certainly made me wonder whether I could do something like the following:

Mouse.registerCursor(MouseCursor.HAND, mouseCursorData);

But as you may have guessed, this does not work as hoped; it’s not possible just to override the graphic used for the hand cursor.

So here’s my workaround for achieving this kind of behaviour, which I opt to keep inside a centralised class (the filthy singleton). I’ve set up a git repository for the full example, but here’s the crux (a few extra functions aren’t shown here):

public function buttonMode_set(target:Sprite, buttonMode:Boolean):void {
	
	//If the dictionary hasn't been initialised, do so and set up the custom mouse cursor//
	if (! _buttonModeDictionary) {
		_buttonModeDictionary = new Dictionary();
		var pointerCursor = new MouseCursorData();
		pointerCursor.data = new <BitmapData>[new Cursor32Shadow()];
		pointerCursor.frameRate = 0;
		pointerCursor.hotSpot = new Point(3, 1);
		Mouse.registerCursor("PointerCursor", pointerCursor);
	}
	
	//Check whether the Sprite has already been registered for use//
	if (target in _buttonModeDictionary) {
		
		//Only add/remove listeners if the buttonMode state is actually changing//
		if (_buttonModeDictionary[target] != buttonMode) {
			_buttonModeDictionary[target] = buttonMode;
			if (buttonMode) {
				target.addEventListener(MouseEvent.ROLL_OVER, pointerCursor_show);
				target.addEventListener(MouseEvent.ROLL_OUT, pointerCursor_hide);
				mouseOver_check(target, true);
			} else {
				target.removeEventListener(MouseEvent.ROLL_OVER, pointerCursor_show);
				target.removeEventListener(MouseEvent.ROLL_OUT, pointerCursor_hide);
				mouseOver_check(target, false);
			}
		}
		
	//Only add the new entry if pseudo-buttonMode is being turned on//
	} else if (buttonMode) {
		
		_buttonModeDictionary[target] = true;
		target.addEventListener(MouseEvent.ROLL_OVER, pointerCursor_show);
		target.addEventListener(MouseEvent.ROLL_OUT, pointerCursor_hide);
		mouseOver_check(target, true);
	}
}

And then it can be turned on and off for each object like this:

buttonMode_set(button1, true);	//button1.buttonMode = true;
buttonMode_set(button2, false);	//button2.buttonMode = false;

The full example can be downloaded from github here: https://github.com/hanenbro/CursorDemo

New Things

Oh… hi! Originally, my opening gag for this post was going to be something along the lines of: ‘Huh. This thing still works…?’ – however, the joke is firmly on me since the ‘kinetype.com’ domain has just reached its year anniversary, and without an up-to-date card on file to renew my ownership, expired unceremoniously. So, no; that thing does not still work. (If you go there now you’ll find a charming ad-laden placeholder and an invitation to step in and claim that red-hot goldmine. Feel free, entrepreneurial reader, to wreak havoc with my brand identity.) Though the option’s still open to renew, I realised that this inventory should now be at the center – rather than the kinetic typography generator to which this blog was first tacked-on. Et cello… a new domain!

So, post shake-up, said generator can be found at akt.akineticblog.com, the old Hope Park Square back-up is now at hps.akineticblog.com, while this guy is at the www subdomain, or just plain akineticblog.com. Why do I get the feeling it wasn’t many posts that ago I was just explaining the last domain set-up…? Enough meta-posting; content!:

I am employed as a Flash developer now. Sweet! This has exactly two benefits:
1) Career finally on track to Coolsville (definitely in an outer borough already), and
2) People asking what I do, unaware of the platform, just think I’m a developer, but a particularly fancy (and arrogant) one. Score.

I work for the wonderful Thought Den <3 – check them out, yo!: http://www.thoughtden.co.uk/

Thought Den, or: Ed('s) Thong Hut

I’ve been made to feel more than at home by Ben and Dan, awesome director-fellows and Kings of Thought Den. They even made a hugely awkward and dorky (completely unfair and impromptu) film of me screwing around with an iPhone-OSC-Flash thing I put together, partly based on the learnings of my previous post on OSC-to-Flash music visualisation. If you can stomach it, read and watch here.

This job move has also meant a spatial move; 302 miles south (woo!) and 70 to the east (boo!). Let’s see, that puts me in … oh, Bristol! Neat! I couldn’t find my camera while I was packing to move (four hours before my flight…), so forgive the sub-par photography, but the Bristol adventure has so far resembled this:

Not Bristol but Troon, in the bleary small hours, packing unfinished - 'Time I took a picture!'

At the airport, in a PA deadzone, obliviously writing an email and missing the boarding call (but only a little bit)

I think I might live along here one day.

Some, uh- scaffolding. It was very, very blue.

Convinced I'd dreamt this, yet there the picture was, in my phone. My clothes and hair were also filthy, and I found a bloodied half-brick, bundled up in my jacket.

What lovely colour sense the engineers and forsakers of this bridge had!

Ah, lucky cats: quintessential Bristol

An economy religion

I might've known it would be a seagull, captaining the shellfish-restaurant-boat

And if thou gaze long into a spiralmonkeyface, the spiralmonkeyface will gaze also into thee.

A more opulent, cobwebbed religion

This isn't actually a photograph but a screencap from when I was wandering through a VR simulation from the 90s. Shortly after, green teapots whizzed past me to collide with a man made entirely of chrome. The shattered pieces then morphed into the word 'cool!' in Comic Sans. Terrifying.

No, naughty cat! Stop it! This isn't your house. But help yourself to Crazy Landlady's frozen food (somehow kept outside during summer...).

*sigh* Doesn't it just make you want to pedal an old bicycle, go buy some bread maybe?



In other Flash-activity / Flactivity, here is a little …Flupdate: I made a desktop clock (a deskclock, if you will) gadget, deploying through Air. It runs like this:

Note: displayed time correct only occasionally; click for greater accuracy

It needs polishing up and some customisation options, since it’s hardcoded to suit my desktop (above the cat), so I’ll add a nice menu and post it here with the source and everything – like a real community-oriented developer! ALSO: The mouse-position wobble thing was a late and non-final addition. The new Flash Player 10.1 and Air 2 runtimes yielded some bizarre corruption, with Sprites seemingly masking-out each other in places they shouldn’t, and at irregular intervals. Bug report en route – but for now I’m having to update all TextFields each second, and ensure the clock is redrawn every frame (not the sveltest of overheads), so I decided to do at least something with the spent processor time, useless as it may be.

Pledge: next update in less than a month.

Hello

I'm Adam Vernon: front-end developer, free-time photographer, small-hours musician and general-purpose humanoid.