Archive for the ‘Actionscript’ Category

Creating a Flex-free MXML app with Razor

As it turns out, it was fairly simple to add support to the base Razor component classes to enable them for use inside mxml. You can use the razor.controls.Application class as the base tag for your mxml, change the default namespace, and instantiate any of the razor components with regular mxml tags. The resulting swf [...]

Posted by Ash on December 23rd, 2009

Filed under Actionscript | 6 Comments »

Razor components now on github, new license.

Its been a long time since the last update, but I recently uploaded the latest version of the Razor component framework to github, ditched the old wiki and set up a new home page. You can find more information, download the source and see a demo application here. I recently changed the license from GPL [...]

Posted by Ash on December 17th, 2009

Filed under Actionscript | No Comments »

AS3: Removing duplicates from an array

Just for shiggles (yes, I said it.), removing duplicate items from an array in one line of ActionScript 3: var arr:Array = ["a","b","b","c","b","d","c"]; var z:Array = arr.filter(function (a:*,b:int,c:Array):Boolean { return ((z ? z : z = new Array()).indexOf(a) >= 0 ? false : (z.push(a) >= 0)); }, this); trace(z);

Posted by Ash on September 3rd, 2008

Filed under Actionscript | 10 Comments »

Messing around with papervision again

Nothing too spectacular, but I threw together a new pointless animation for my front page. See it here. One day I will have enough varied content to warrant a menu or something. Here is the source, for learning purposes. It won't compile without a couple of files, but you can get the idea

Posted by Ash on June 5th, 2008

Filed under Actionscript | 3 Comments »

AS3 Dynamic Speech Bubble Snippet

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. [...]

Posted by Ash on January 28th, 2008

Filed under Actionscript | 19 Comments »

Converting html entities in AS3

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 [...]

Posted by Ash on November 2nd, 2007

Filed under Actionscript | 22 Comments »

FP9 component pseudo-comparison

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 [...]

Posted by Ash on July 27th, 2007

Filed under Actionscript | 5 Comments »

Slow progress

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 [...]

Posted by Ash on May 30th, 2007

Filed under Actionscript | 5 Comments »

Flash and Papervision3D abuse

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

Posted by Ash on May 24th, 2007

Filed under Actionscript | 6 Comments »

FlashDevelop 3 alpha

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 »