PolarClock3 for Snow Leopard

I’ve had some time this morning to wrap the screensaver up in something other than screentime, and it all works perfectly for me. My first delve into Cocoa. Thanks Si Heys for the code I needed for this.

Please have a go and let me know if it works ok on Snow Leopard, and also older OSes, if there’s problems, comment here, and I’ll try and rectify any issues.

You can download it here.

Polar Clock plans

I’ve had countless requests to update PolarClock for OS X, as it’s not working on Snow Leopard at all.

I’m going to ditch screentime for flash, and work with some open source code from my friend Simon Heys, hopefully this will be much more reliable than screentime, which I’ve had nothing but trouble with and it’s really expensive for a screensaver that I want to offer for free.

For the PC versions, I’ll be using InstantStorm, or something similar.

jQuery plugins coming soon.

Pretty soon, I’ll be releasing two plugins for jQuery.

They are re-writes of my current javascript extensions to SWFObject. One for full browser flash with a minimum width and height. And an updated version of the MouseWheel enabler for Macs.

I’ve gone for jQuery as I’ve been using it a fair bit recently with jQuery SWFObject, and it’s super easy to work with.

Here’s an example of a full browser flash object, with a minimum width/height. The best thing being that there is no requirement for fiddly CSS to make the full browser view work, the CSS is all implemented by jQuery!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$(document).ready(function () 
{
	// add an extra class to the <body> element for JS-only styling
	$("body").addClass("js");
 
	$.flash.expressInstaller = '_includes/expressInstall.swf'; 
 
	if( $.flash.hasVersion(9.1) )
	{
		var mainFlash = $.flash.create(
			{   
				swf: 'FlashApplication.swf',
				width: '100%',
				height: '100%',
				id: 'FlashApplicationSwf',
				name: 'FlashApplicationSwf'
			}
		);
		SWFAddress.setId('FlashApplication');
		$('#flashContent').html( mainFlash );
		$('#flashContent').fullFlashMinSize( 800, 600 );
	}		
});

Wired article

Wired got in touch a while ago asking about the PolarClock, and I’ve finally seen the finished article, it looks great!

pic after the jump…

Read more

iPhone PolarClock released

Screenshot2

Ed Kauffmann over at RayFlex has been busy developing the iPhone release of the PolarClock. It’s now ready and released at version 1.0. If you buy this application you will get free upgrades to future versions. Money raised from the sales of the iPhone version will go towards further development of both the iPhone and Mac/PC versions of the PolarClock.

It has a few new features, my favourite being the moon phase at the centre of the concentric rings. Good work ed.

You can get a copy here:

Crazy popularity!

I’ve been contacted a few times recently for info about the Polar Clock screensaver. It’s been hugely successful, far beyond my imagination. To date, it has been downloaded 295,676 times. This blog has has over 3,500,000 unique visitors in the last 2 years! That’s amazing!

There’s an article in Computerbild (Germany) and Wired US is doing a feature on it this month (link soon).

Play Balloonacy

raceacrosstheinternet.jpg

Myself and the top notch team of internet professionals at Poke have just finished this monster project, check it out. It’s mental.

AS3.0 MouseWheel on Mac OS X

I’ve finally found the time to port my SWFObject add-on SWFMacMouseWheel (catchy I know) to ActionScript 3.0 and SWFObject 2.0

There’s now two examples in the zip, one for use with SWFObject 1.5, and a totally re-written version for use with SWFObject 2.0 (formerly SWFFix)

All you have to do in your main application class (or document class) is
[as]
import com.pixelbreaker.ui.osx.MacMouseWheel;

MacMouseWheel.setup( stage );
[/as]

You can then add listeners to TextFields, Sprites etc etc as you normally would any other MouseEvent.

Example JavaScript to be used with the dynamic embed method
[js]
var vars = {};
var params = { scale:’noScale’, salign:’lt’, menu:’false’ };
var attributes = { id:’testObject’, name:’testObject’ }; // give an id to the flash object

swfobject.embedSWF(“test_as3.swf”, “flashContent”, “100%”, “100%”, “9.0.0″, “js/expressInstall.swf”, vars, params, attributes );
swfmacmousewheel.registerObject(attributes.id);
[/js]

I have updated the SWFObject 2.0 version to be more compact, and it also falls inline with the code style of SWFObject2.0. see swfmacmousewheel_src.js for the uncompressed version, deploy swfmacmousewheel2.js on your site.

Download source and demo here or view the demo online

AS3.0 Memory monitoring

I just came across the property System.totalMemory. It’s very useful, especially for the engine I am currently working on, and dealing with AS3 garbage collection.

It returns the memory currently being used by the Flash Player. It’s in bytes so it pays to clean it up slightly.

[as]
var mem:String = Number( System.totalMemory / 1024 / 1024 ).toFixed( 2 ) + ‘Mb’;
trace( mem ); // eg traces “24.94Mb”
[/as]

It seems this takes account of all instances of the flash player. For example, I have a logger/debug panel running in the sidebar of firefox, built in flex. As soon as I open this and it’s initialised, it uses an extra 5 – 10mb of ram. So be warned, if you see a massive increase in memory usage, check you don’t have loads of sites open with ad banners or other flash based stuff.

Back from Flash on the Beach

photo by BIT-101
I got back from Brighton yesterday, exhausted after 3 days of excellent sessions and some heavy drinking sessions too!

The high points for me were Mario Klingemann’s “2D or not 2D, that is the question” talk about working with BitmapData. He showed how to make a “Magic Wand” tool a la photoshop. His process was impressive to say the least, and I’m very interested in playing with the paletteMap method of the BitmapData class.

The session from AndrĂ© Michelle was amazing, he demoed his PopForge sound synthesis engine. Generating sound entirely within flash at run-time. See the video below, this is all generated and manipulated in flash. It’s simply amazing, I can’t wait to get some time (after this post) to start messing around with sound in flash.

Read more

Previous Entries