New role at Digit!
After being freelance for the last 8 months, which has been pretty chaotic, I’ve accepted the position of “Senior Creative Technologist” at digit, a long established London agency.
It’s going to be a really interesting role for me, where I’ll carry on working with the Flash Platform (Flash, Flex, and hopefully some AIR apps), but also be involved in developing and designing physical interaction pieces using many technologies that I’ll be new to. Like Java, C#, mobile phone development, touch screens, motion sensors, whatever goes really. It’s going to be a great opportunity to broaden my knowledge.
RSS/Atom syndication made easy
A while ago adobe released their as3syndicationlib for easy access to RSS & Atom feeds by converting either RSS 1.0/2.0 or Atom feeds into generic data accessible via the IFeed interface. These libraries also require adobe’s corelib.
It literally took me 5 minutes to write a simple wrapper class to handle the loading of the feeds, and simply trace out the headlines of each item.
Read more
PolarClock 3.0 Release
It’s all done!
Re-worked from the ground up in ActionScript 3, this release should be much less CPU intensive, and has had heaps of new features added. Read all about it at it’s new permanent home.
AS3.0 Abstracts
Another thing I needed was a strict abstract class in AS3, again, public only constructors, and the absence of the "abstract" keyword from ActionScript meant a workaround.
-
package
-
{
-
import flash.utils.getDefinitionByName;
-
import flash.utils.getQualifiedClassName;
-
-
public class AbstractExample
-
{
-
public function AbstractExample()
-
{
-
if( Class( getDefinitionByName( getQualifiedClassName( this ) ) ) == AbstractExample ) throw new Error( 'AbstractExample must be extended' );
-
-
// rest of constructor here...
-
}
-
}
-
}
I like this solution best as it doesn't rely on strings for comparison as in Tink's example. His method is shorter, and easier for typing. It's down to personal preference really.
AS3.0 Singletons
While I've been getting up to speed with my AS3 over the past few months, there have been a few things which are really useful to know and took a bit of digging about to find.
As class constructors in ActionScript 3.0 must be public, there's not a really clean way to force a class to be a singleton as there is in ActionScript 2.0 or Java say.
-
package
-
{
-
public class Singleton
-
{
-
public static var instance:Singleton;
-
-
public static function getInstance():Singleton
-
{
-
if( instance == null ) instance = new Singleton( getInstance );
-
return instance;
-
}
-
-
public function Singleton( caller:Function )
-
{
-
if( caller == Singleton.getInstance )
-
{
-
// instantiate class here
-
}
-
else
-
{
-
throw new Error( 'Singleton is a singleton, use getInstance();' );
-
}
-
}
-
}
-
}
It's pretty simple, you can't call new Singleton() because the compiler will be expecting an argument, and if you do pass an argument, it will throw an Error because the caller is not the Singleton.getInstance method.
So you can only access this class by calling Singleton.getInstance().
Polar Clock 3.0 development
![]()
Just an update of how the development of the next release of the clock is going.
I've ported 90% of the engine to actionscript 3.0 now, and begun implementation of a config panel built using Flex Builder 3 (Moxie). I've now got the following language implemented: English, Afrikaans, Chinese, Danish, Dutch, French, Finnish, German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Portugese, Portugese (Brazil), Polish, Romanian, Russian, Spanish, Swedish, Slovakian, Thai, Turkish and Vietnamese.
I have spoken to a guy at ScreenTime (who make screentime for flash) and they are sending me an updated version for windows in a couple of days, to match up the sizes of the config panels with the latest release for mac. Yeah, I bought screentime for mac + windows!!!
I'm hoping to launch version 3 of the clock on of before 21/07/07. Keep checking for updates!
So far there have been over 40,000 downloads of v1 and 2, it's much much more popular than I ever expected!
ProggyFonts and Eclipse on OS X
![]()
I've tried every way I could think of to get eclipse to stop anti-aliasing the editor font since I started using it over a year ago. I used to use ProggyTiny in my previous editors, as it's a compact and easy to read font for coding.
I worked out today that ProggyFonts has a version of some of it's fonts (the best ones) available in apple's dfont format, which do not get antialiased by Eclipse. Just click on the file icon with the apple in it next to each font where available.
There's a few little niggles with using these fonts, in your FDT or Eclipse settings, make sure you don't set any syntax types to display in bold or italic, as the font doesn't display.
Polar Clock update
I'm currently working on sorting some issues with the current release of the Polar Clock. From comments feedback, it seems be an issue that the processor is under heavy use when the clock is running. Hopefully this will be aided by the porting of the existing code to AS3.
I'm looking into the following:
Using Chromo™ colours
Adding an options panel to allow turning on/off a millisecond ring, choosing different colour schemes, and lastly, choosing a locale. Also making the logo fade out after a while.
I want to add as many languages as I can get together. Help from you out there would be great.
Read more
Polar Clock v2
Version 3 is now available here
I've made a few changes to my polar clock to make it clearer to read, and now there's also a PC installer
GammaSlamma
I've just discovered this little app! All you do is drag a png onto it, and it strips all the Gamma information out of the PNG file, which happens to make the colours perfect in Flash, and also takes a lot off the filesize.
I just processed a background image that was 116Kb and it came out as 63Kb!!!