Fonts to code by

Discussion

I've recently switched my default Flex Builder font to Consolas, and so far I'm really happy with it. To me, it seems a lot clearer to read than Courier. The only caveat is that you have to enable ClearType on windows or else it looks like crap (Display Settings -> Appearance tab -> Effects.. -> Use the following method to smooth edges of screen fonts.)

Consolas snapshot

Update: This font isn't available as a separate download, but it comes as part of MS PowerPoint Viewer 2007, available here.

Whats your favourite coding font?

Posted by Ash on August 1st, 2007

Filed under Discussion | 5 Comments »

FP9 component pseudo-comparison

Actionscript

I thought I'd compile a little comparison of my Razor components (80% done!) vs the flex framework and the Flash CS3 components. I included just the components shown, but this is slightly unfair to Flex since it includes way more features in the framework that aren't actually used here. Flash player 9 required for all of these movies except the first.
Read the rest of this entry »

Posted by Ash on July 27th, 2007

Filed under Actionscript | 5 Comments »

Slow progress

Actionscript

Last night I put some finishing touches to the Color Swatch/Color picker components for the Razor Component Set. It is mostly a rewrite of the old AS1 colour picker I made a few years ago. You can see the results below!

On another note, I've decided that the whole component set (AS 2 and 3 versions) will be released under the GPL, but you will be able to obtain a commercial license (I promise it will be very reasonably priced :D ).

Posted by Ash on May 30th, 2007

Filed under Actionscript | 5 Comments »

Flash and Papervision3D abuse

Actionscript

I have these incredible tools at my disposal, and I produce this...

Read the rest of this entry »

Posted by Ash on May 24th, 2007

Filed under Actionscript | 6 Comments »

FlashDevelop 3 alpha

Actionscript

I've been waiting for this one for a while: FlashDevelop 3.0.0 alpha was just released on the FlashDevelop forums.

http://www.flashdevelop.org/community/viewtopic.php?t=1436

Posted by Ash on May 22nd, 2007

Filed under Actionscript | No Comments »

Stuff to check out

General

Been a long time posting! I guess you can put it down to being busy busy, but probably also due to lack of creative juices (beer?). I've found that I maybe underestimate my free time when it comes to my personal projects, and that I take on too much.

Case in point.. I've been working on an AS2 component set now for over a year and a half. I took a look at it the other day and its still missing some features, like you still can't skin with bitmaps (an essential feature!). Anyway, I started going over the API, standardizing method names, documenting, and making things private that shouldn't be public. I would like to convert them to AS3 pretty soon, because I still think there are some pretty cool aspects about them that people might find useful.
So look forward to that in 2009! :)

In the meantime, I've been following the progress of both Sandy and Papervision3D. Both engines are making great steps to cool 3D stuff in flash, and I've started using papervision for a small 3D game idea (think Rez).

Also, Joa Ebert is doing some really awesome stuff with image processing, and also experimenting with the Wii remote. This is interesting to me having just acquired a Wii console (those things are hard to find!). I've inserted his blog into my regular blogroll.

ByteArray.org has some interesting low-level AS3 stuff, definitely worth checking out.

I really need to get back into making fun stuff in flash!

Posted by Ash on February 14th, 2007

Filed under General | 1 Comment »

AS3 learning process: Stuff that wasn't obvious #1

Actionscript

I finally have the chance to work on a real-world Actionscript 3 project (yeah, its been a long time coming). I realise that this post may be old news (and really pointless) to a lot of you, but I decided to write about things that weren't immediately obvious to me while learning AS3.

The Loader class doesn't dispatch events, but Loader.contentLoaderInfo does.
If you take a look at the API documentation for Loader.load(), you'll notice that the different events dispatched after a load operation are listed, which lead me to think that the loader itself dispatches them. The fact is that you actually need to add your event listeners to Loader.contentLoaderInfo as shown in the example on that page.

In order to use flash.utils.getDefinitionByName(), your class has to actually be compiled into the swf.
Well, duh. Flash player will throw an error if it can't find your class. This is easily solved by including a reference to the class in your source code somewhere.
private var myClass:Class = com.package.to.MyClass;

Removing a particular item from an array is easier!
array.splice(array.indexOf(obj),1);

Copying attributes of an xml node into an object is.. different.
var o:Object = new Object();
for each (var z:XML in node.@*)
{
o[String(z.name())] = z;
}

You can check if a DisplayObject is actually attached to a display list by checking the stage property.
If the stage property is null, it isn't attached. This might seem obvious but if you're trying to find out why something isn't showing up.. the reason could be that you forgot to actually attach it with addChild().

In Flex Builder's Actionscript 3 projects, mx classes aren't immediately available.
You need to add the mx framework.swc to the project under Project->Properties->Flex Build Path->Library Path (tab)->Add SWC.. (button). The file is located at: ${FRAMEWORKS}/libs/framework.swc.

AS3 base types don't always default to null.
Variables of certain base types such as Boolean and int are no longer 'undefined' when declared. This means you can no longer perform checks such as:
if (myBoolean == undefined) doSomething(); since boolean values default to false.
You can find a list of default values on this page in the documentation.

More to come..

Posted by Ash on October 27th, 2006

Filed under Actionscript | 10 Comments »

Change is good!

General

A couple of weeks late posting this (been busy!), but I am very happy to report that I'm now an employee of Schematic, working out of their new Boston office with some very talented people.

After being mostly in the education industry for 5-or-so years, I'm looking forward to creating stuff that might be a little more exciting (and a little more visible)!

Posted by Ash on September 28th, 2006

Filed under General | 2 Comments »

Actionscript 2 Mystery of the day

Actionscript

I was just wondering if anyone could give me a good reason why

trace( (0 || 23) );

would trace '23' instead of 'true' in AS2.

Bonus points for answers that contain mythical code-gnomes.

Posted by Ash on August 22nd, 2006

Filed under Actionscript | 9 Comments »

BFPUG

Discussion

I went to my first Boston Flash Platform User Group (BFPUG) meeting last night. Met some interesting people whose names I've seen before. But now I have faces to put with those names.

On August 23rd, Ted Patrick is flying in all the way from the Adobe mothership to give a talk on Flex.. so I'll definitely be there for that one.

So, if you're in or around Boston and even remotely interested in Flash, why not come along?

Oh yeah.. I also got an orange Adobe pen. BONUS! ;)

Posted by Ash on July 27th, 2006

Filed under Discussion | 2 Comments »