Archive for the ‘Programming’ Category

July 15, 2011 0

iteration test with arrays and vectors

By in Action Script, Professional, Programming

Since FLash 10.x is out for a while now, I’m thinking about updating my code to support typed Vectors instead of Arrays. So I made a small benchmark to get an idea of the difference between the performance of an Array and a Vector. The benchmark creates an array and vector containing int values (assigning […]

Tags: , , ,

March 19, 2011 2

Using fonts inside a runtime shared library (RSL) loaded trough actionscript in Flash CS4 and CS5

By in Action Script, Professional, Programming

This post describes what additional step is required when using fonts in a runtime shared library (RSL) that is loaded trough actionscript.

Tags: , , , , , ,

March 19, 2011 0

Load and use runtime shared libraries trough actionscript in Flash CS4 and CS5

By in Action Script, Professional, Programming

A post that describes how to use runtime shared libraries (RSL) while loading those via actionscript instead of letting Flash load them automatically.

Tags: , , , ,

March 19, 2011 0

Embedding additional font outlines in a runtime shared library (RSL) with Flash CS4

By in Action Script, Professional, Programming

This post describes a solution to embed additional font outlines with a Font definition within a runtime shared library (RSL) with Flash CS4.

Tags: , , , , , , ,

September 12, 2010 2

Flex 4, asdoc and custom tags

By in Action Script, Professional, Programming, XSLT

Today I decided to update to flex 4. After installing version 4.1.0.16076 I ran asdoc to see if the comments in my action script library still were ok. Things had changed though, as I discovered. Below I describe my experience and solution. Since I’m sending out my library with various project sources I have included […]

September 11, 2010 0

Weakly referenced listeners

By in Action Script, Programming

I never paid a lot of attention to the 5th parameter of addListener, the useWeakReference parameter. But the other day I decided to play a bit with it. As a reminder of its function I created a small test. To create it yourself, perform the following steps: 1. Create new AS3 movieclip in Flash IDE […]

September 5, 2010 0

Flash quirks: SimpleButton can be a DisplayObject.parent

By in Action Script, Programming

While developing a custom cursor class I came across the following quirk. One of the things the custom cursor class does is checking if mouseChildren of all parent DisplayObjectContainer instances are enabled. It retrieves the current objects under the mouse via this.stage.getObjectsUnderPoint and recursively processes the parent properties till the stage instance is reached. The […]

December 25, 2009 0

Resizing Flex swf after loading it in Flash swf

By in Action Script

Don’t change the width and height properties. Instead use: // see SystemManager help setActualSize(aWidth, aHeight);// see SystemManager help setActualSize(aWidth, aHeight);

June 17, 2009 3

Prototype and as3

By in Action Script

On twitter someone asked something which included the prototype property. With as1 I used (like all) prototype to extend and create new classes. With as2 class definitions changed completely and since then I stopped using prototype. I never thought about it, until someone mentioned it on twitter. I became a bit curious about the prototype […]

Tags: , ,

April 21, 2009 0

REMOVE and REMOVE_FROM_STAGE difference

By in Action Script

Short reminder: Event.REMOVE does bubble; Event.REMOVE_FROM_STAGE does not. So when implementing a listener don’t forget to check the target: function onRemove(anEvent: Event) { if (anEvent.target == this) { // clean up } }function onRemove(anEvent: Event) { if (anEvent.target == this) { // clean up } }

Tags: