Razor Component Trac now up and running

Hot

After a week of inserting asdoc comments, I uploaded the source to the Razor Component Framework to my public svn. The components also have a new project page, at:

http://www.razorberry.com/components/

The ticket system is open to submission as long as it doesn't get spammed, and I will also be adding more documentation and examples on the wiki over the coming weeks.

I'm always open to constructive criticism, so please feel free to email me (razor (at) razorberry.com) with your thoughts, just as long as your thoughts amount to more than "These suck!". But please also keep in mind that this is beta software, and I'm providing no warranties or guarantees of any kind :) .

As I mentioned in my last post. I still need to backport some features before releasing the as2 source, but the as3 source is all there.

Have fun!

Posted by Ash on April 22nd, 2008

Filed under Hot | 5 Comments »

Announcing the Razor Component Framework

General

Razor component framework

I've posted about the components I've been working on as a side project for a long while now. Finally, I'm just about ready to release them to the public in a beta state.

The Razor Component Framework is intended to be a lightweight, yet feature-rich alternative to the mx framework for Flash, Flex and AIR. It comes in both ActionScript 2 and 3 flavours while maintaining as consistent an API as possible.
Read the rest of this entry »

Posted by Ash on April 8th, 2008

Filed under General | 2 Comments »

AS3 Dynamic Speech Bubble Snippet

Actionscript

The static method drawSpeechBubble in the file below uses the drawing API to draw a rounded rectangle based speech bubble with a dynamic point. The side the point is on moves depending on the relative position to the bubble. It looks best if you set the point to be fairly close to the actual rectangle.

Usage:

AS:


SpeechBubble.drawSpeechBubble(target:Sprite, rect:Rectangle, cornerRadius:Number, point:Point)

// Example:
var g:Graphics = graphics;

var m:Matrix = new Matrix();
m.createGradientBox(200,100,90*Math.PI/180,80,80);
g.clear();
g.lineStyle(2,0x888888,1,true);
g.beginGradientFill(GradientType.LINEAR, [0xe0e0e0, 0xffffff], [1,1], [1,0xff],m);
SpeechBubble.drawSpeechBubble(this, new Rectangle(80,80,200,100), 20, new Point(120,300));
g.endFill();

Sample (move mouse to change point position):

Download:
SpeechBubble.as

Apologies for any code messiness! I'm aware that you can create a dent in the corner.. it's probably up to you to position the point sensibly so it doesn't screw up :)

Posted by Ash on January 28th, 2008

Filed under Actionscript | 19 Comments »

I am not Singularity..

Discussion

..until I find out what it is.

But kudos to Aral for his viral marketing strategy ;)

Posted by Ash on January 26th, 2008

Filed under Discussion | 1 Comment »

Announcing Adobe AIR in Action

General

AIR in Action cover

For a while now I've been spending my spare time writing about AIR for an upcoming book titled "Adobe AIR in Action" published by Manning.

I've had the pleasure of working with three very talented co-authors, Joey Lott, Sam Ahn, and Kathryn Rotondo. I'm psyched about the release since I think we've put together a very solid guide to Adobe AIR from a Flash and Flex perspective, and we've come up with some great examples that utilize each individual aspect of the new API.

My chapters are centered around utilizing databases in your AIR application, including some primers on SQL, and integrating HTML and JS content into your app.

The book will be released in a few months, but if you can't wait that long, you can actually read chapters in their 'uncut' format in Manning's Early Access Program. You can also pre-order the book on Amazon, here.

Click here for more information.

Posted by Ash on January 24th, 2008

Filed under General | 6 Comments »

Not a good advertisement for Flash

Discussion

Flash crashes in Times Square.

Posted by Ash on December 1st, 2007

Filed under Discussion | 2 Comments »

Converting html entities in AS3

Actionscript

I'm posting this here mainly because I always have to look it up. But maybe this post will help someone down the road.

Converting a string with html entities (such as &) to their respective symbols:

AS:


public function htmlUnescape(str:String):String
{
    return new XMLDocument(str).firstChild.nodeValue;
}

Converting a string so that it has html entities:

AS:


public function htmlEscape(str:String):String
{
    return XML( new XMLNode( XMLNodeType.TEXT_NODE, str ) ).toXMLString();
}
AS:


trace(htmlEscape("ham & eggs"))// ham & eggs
trace(htmlUnescape("ham & eggs"))// ham & eggs

UPDATE: AS2 versions by request.

AS:


function htmlUnescape(str:String):String
{
    return new XML(str).firstChild.nodeValue;
}

function htmlEscape(str:String):String
{
    return new XMLNode( 3, str ).toString();
}

Posted by Ash on November 2nd, 2007

Filed under Actionscript | 22 Comments »

Obligatory See-you-at-FlashForward post!

Discussion

I'll be walking the entire distance from my home to FlashForward Boston (a whole 15 minutes!). Lots of interesting lectures scheduled.. I'm especially looking forward to Chris Allen's Building red5 applications, Mario Klingemann's lecture on generative art, and of course Carlos Ulloa's Papervision lecture (sure to be packed), among others!

Hope to see you there!

Posted by Ash on September 18th, 2007

Filed under Discussion | 2 Comments »

The last question

Discussion

Not flash related, but if you have ten or fifteen minutes to yourself and haven't read it before, I highly recommend this short story by Isaac Asimov.

Posted by Ash on September 1st, 2007

Filed under Discussion | No Comments »

Flash scene

Hot

Assembly '07 recently wrapped up in Helsinki, Finland. Along with the party came a whole slew of new flash demos to watch. The winners of the Browser demo competition were Evoflash and BombSquad, with their demo ADHDTV, which you can see here. They also made the excellent Who killed Travolta from last year.

You can find a full list of releases with downloads at the scene.org ftp site. And the full party results are here.

Posted by Ash on August 7th, 2007

Filed under Hot | No Comments »