Nobien A nerd blog about nerdy things by … nerdy guys?

12Jun/083

AS3 Game Development Anyone?

I'm going to start tooling around with game development in AS3. Oh trouble is, I'm not sure where to start. Does anyone have any nice sites/blog entries/tutorials on game design and architecture that they'd like to point me to? It'd also be nice to have a decent list of things to check out when someone, like myself, decides to get into game development, or needs help figuring something out.

26May/082

AIR Create-Modify-Reuse

Back on the 25th of April, I posted a little something about us (Matt & me ... and Toddly Anderson) releasing a certain book entitled Adobe AIR, Create-Modify-Reuse, published by Wiley & Sons.

Well, at that time, MXNA was down, so only a few regular viewers saw it. So I figured I'd just throw it out there again that our book came out. It's a book featuring eleven applications that you can use "out of the box" and hopefully use to create your own rendition using Adobe Flex 3 and AIR. If you do create your own app based on ours, or found the book useful in guiding your own creation, we encourage you to tell us about it.

Also, you should pick up the Flex 3 Cookbook by friends Josh Noble and Toddly Anderson (again). Another book (that will be awesome) is Adobe AIR in Action and was written by my old co-workers Joey Lott, Katheryn Rotondo, Sam Ahn and Ash Atkins (also the tech-editor of our book).

So now that you're about $80 in the hole, I'll let you be.

14May/087

Duplicate a DisplayObject as a BitMap

In working on a project, I created a simple utility class that has this public static method. This basically takes a DisplayObject, copies it, and adds it to a new Sprite which is then returned to the caller. Simple enough. I'm sure this can be refined or done a different way, so have at it.

public static function duplicateImageAsSprite( original:DisplayObject ):Sprite
{
    var bitmapData:BitmapData = new BitmapData( original.width , original.height ,
        true , 0x000000 );
    bitmapData.draw( original as IBitmapDrawable );

    var bitmap:Bitmap = new Bitmap( bitmapData );

    var returnSprite:Sprite = new Sprite();
    returnSprite.addChild( bitmap as DisplayObject );

    return returnSprite;
}
12May/087

More Than Two Simultaneous Key Presses and KeyboardEvent.KEY_DOWN Woes

I'm rather annoyed right now. For whatever reason, I didn't think that determining if the user has 3 keys pressed at once would be so difficult. Attempt to press all the arrow keys that correspond to the arrows being displayed...

Sometimes it works, sometimes it doesn't and I can't understand why or find a pattern to the malfunction. But basically whats happening is at some point the KEY_DOWN event just isn't dispatched for a particular arrow key once two of the other arrow keys have been pressed. Does anyone have any freaking idea why this is happening?

26Apr/0824

SWFAddress 2.1 & SWFObject 2 Work Together.

I spent a good hour yesterday trying to get SWFAddress 2.1 and SWFObject 2 to work together. First off, they do work together. Second, there's nothing to it. Then why did it take me an hour? Because I'm a dummy and I had the order in which each JavaScript set was called. In hindsight, this is common sense, but the golden ticket here is calling SWFAddress javascript BEFORE declaring the SWFObject. This more applies to people using the dynamic way of embedding the SWFObject. ie:

 
<head>
    <title>SWFObject v2.0 - step 3</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <script type="text/javascript" src="js/swfobject.js"></script>
    <script type="text/javascript" src="js/swfaddress.js"></script>
    <script type="text/javascript">
                swfobject.embedSWF('website.swf', 'website', '100%', '100%', '9.0.45', 
                'swfobject/expressinstall.swf', {}, {bgcolor: '#CCCCCC', menu: 'false'}, {id: 'website'});
    </script>
</head>
 

Silly right? I saw a couple of posts out there of people having a hard time getting this going. Once I flipped the JS declaration, it worked. And I felt kinda dumb. But hey ... That's life.

BTW: both SWFAddress and SWFObject 2 are pretty amazing and should be worked into your site/app flow if they aren't already.

25Apr/084

New Book, New Look.

After a year of neglect, we have finally revamped our blog. This new look will hopefully pressure us (more so, me) into posting more.

One main reason why we haven't been updating this site as much within the past year is that we've been working on Adobe AIR: Create-Modify-Reuse (or just Adobe AIR: CMR). I know we have posted some info about this in the past, but I we're pretty excited since it's finally coming out.

Adobe CMR was written by Todd Anderson and the two of us (Matt & Marc). Additional support for the book included our editor, Brian Hermann and technical editor, Ash Atkins.

The book is a learn-by-example guide to AIR. It is in no way a reference manual. However, if you find that you learn better by building, but don't necessarily know where to start, this is for you. Adobe AIR CMR takes you through eleven sample applications that you can modify and call your own. All together, I believe the book came together really well and is something we are all proud of. If you so happen to pick it up, we hope that you enjoy it.