Archive for the 'Flash' Category

Finally, a decent editing font

I’ve been struggling, since my switch to OS X, to find a decent bitmap small font that is very readable and aliased for OS X.

Today I found ProFont, which is perfect in Eclipse if you set OS X to alias fonts <=10pt.

I’ve also found Anonymous, which is great if you don’t want to turn of anti-aliasing at smaller sizes, it looks great at 11pt.

Anyone else know a good font for OS X coders?

Kernel Debugger

debugger
I’ve been using this for a long time now, it’s a debugger that runs in another SWF and is passed trace statements via my Debug class, with different levels or detail, info, warning, event, classinfo, error etc. It also has a runtime monitor graph at the bottom, the yellow line showing the current framerate, and the blue line showing the time it takes to execute all threads currently running in the Kernel class. The Kernel is basically a single onEnterFrame on a MovieClip in the _root, which runs through an array of threads, I simply have a getTimer() at either side of the thread execution and time it, this is a great way to view code-weight, especially when developing games or persistent enviornments such as physical engines.

I will make a public release of the Kernel, Thread and ThreadGroup classes soon, which will also include the debugger.

2D Physics API

I’ve recently been doing some games work that required some pretty full on physics, after battling with vectors and collision reflection on wheels and other objects, I ditched what I had done and am now working with FlaDE (Flash Dynamics Engine) an AS 2.0 GPL Licensed API. It’s written by Alec Cove, and is very easy to use. It never went to final release, and he has now moved on to APE (ActionScript Physics Engine) which is written instead in AS 3.0 and is again GPL Licensed.

Very Clean 3D vector rendering

lab-badimon.jpg

Just found this http://lab.mathieu-badimon.com/

Some serious work has gone into the vector-renderer under the bonnet of this one! Good stuff

ServiceCapture

This looks like a really handy tool for keeping a close (and detailed) eye on all your HTTP traffic. It deserializes SOAP, JSON, AMFPHP and other Flash Remoting traffic to a tree based format.

ServiceCapture for Windows and OS X.

A better implementation of FlashVars

[slug]DataTypedFlashVars[/slug]Patrick Mineault has an interesting approach to using flashVars and getting data typed objects passed into Flash.

A sane approach to FlashVars

SWFObject add-on: Size limiting for full window flash

[slug]swfforcesize[/slug]Here's another add-on for SWFObject. This one allows you to create a full-window flash movie, but when the browser window is set below the specified size, the div containing the flash is kept at the minimum size and horizontal/vertical scrollbars are displayed.

Again it's easy to implement, you have to make a few small changes to the HTML/CSS/JavaScript
Read more

Tamarin Project

The Actionscript Virtual Machine 2 (AVM2) is going open-source with Mozilla and Adobe joining forces. Tamarin will be a model for JavaScript 2.0 and ActionScript 3.0 and any other language that is fully ECMAScript 4 compliant. It's aim is to create a more unified scripting interface for RIAs in future, it should also enable much more 'native' language bridging, i.e. passing properly datatyped objects between JavaScript, ActionScript and JScript.

http://www.mozilla.org/projects/tamarin/

SWFObject add-on: MouseWheel on Mac OS

I've had the mouse wheel working in flash on OS X for a while, and after seeing the SWFAddress add-on for deconcept's SWFObject embedding system, I thought I'd add mousewheel functionality to SWFObject, rather than using my own "frankenstein" embedding system.

It's straight forward to implement. Download SWFMacMouseWheel here.


Read more

FDT Template

Ever built a class that extends MovieClip, which has no assets in it at compile time? But you still feel you have to place a blank MovieClip in the Flash library bound to this class?

I got sick of doing this each time I create a new MovieClip extending class, so I've taken the FDT template 'create' which normally inserts a static method for attaching your class, but relies on that blank movie and made it work without it. This method also allows you to pass Arguments directly to the constructor function, which you cannot normally do when using attachMovie etc.

An example class looks as follows:

Actionscript:
  1. class Example extends MovieClip {
  2.  
  3.     function Example( arg1:String, arg2:Object )
  4.     {
  5.         // do something with the arguments...
  6.     }
  7.  
  8.     public static function create( container:MovieClip, name:String, depth:Number, init:Object, args:Array ):Example
  9.     {
  10.         var mc:MovieClip = container.createEmptyMovieClip( name, depth );
  11.         if( init ) for( var i:String in init ) mc[ i ] = init[ i ];
  12.         mc.__proto__ = Example.prototype;
  13.         Function( Example ).apply( mc, args );
  14.         return Example( mc );
  15.     }
  16. }

To implement that class, you would do

Actionscript:
  1. var initObject:Object = { _x: 100, _y: 200 };
  2. var constructorArgs:Array = [ 'a string', { value:'a property', value2:'another property' } ];
  3. var myExample:Example = Example.create( this, 'example_mc', getNextHighestDepth(), initObject,  constructorArgs );

To install this template, download this XML file, open Eclipse, go to preferences > FDT > Editors > Templates, select Import... and select the unzipped XML file.

There are other methods for achieving the same effect, Peter's one is a great example.

« Previous PageNext Page »