NOTE: Sadly I am no longer updating this blog. You can go to my homepage instead.
May 24 2008

AS3 | Programming

Setting private property values of a cloned ActionScript 3 object

Sometimes when cloning an object it is desirable to set a private or read-only property on the clone. Since these properties aren’t writable from outside the class itself, how can their values be changed? Drawing from the ideas of Grant Skinner’s post on Singletons the same internal class technique can be used to set properties [...]

Read the rest of this entry...
May 14 2008

AS3 | Flex

Transformational Canvas v1.0

I wanted to create a Flex Canvas-based component that acted like a camera looking down on a tabletop containing objects. Any item added to the canvas would automatically be able to be dragged as a group and individually, while the whole view could be zoomed and rotated. Here is the result:   This movie requires Flash [...]

Read the rest of this entry...
May 07 2008

AS3 | Flex | Programming

Encapsulating interactive behavior in Flex applications for better code readability

Consider for a moment dragging an element within an application. The steps required for this operation are as follows: Behavior Description Event to listen for START DRAGGING… When the mouse button is pressed down over the element. MouseEvent.MOUSE_DOWN DRAG… While the mouse is moving and the mouse button is pressed down over the element. MouseEvent.MOUSE_MOVE [...]

Read the rest of this entry...
May 01 2008

Programming

Efficient storage and retrieval of boolean values using bitwise operations

Since each digit in a binary number is only composed of one of two possible values, 0 or 1, a binary number can be thought of as a series of switches. Each of these switches can be thought of as a TRUE or FALSE value if it is 1 or 0. So a binary number [...]

Read the rest of this entry...
May 01 2008

Math

Formatting decimal as binary

While most of the time you will see numbers in the decimal number system (using the digits 0 through 9), internally within your computer these numbers will be represented in binary. In the binary numeral system each number can only be composed of a sequence of two values: 0 or 1, ON or OFF, TRUE or [...]

Read the rest of this entry...
May 01 2008

Math | Tools

Number Base System Converter

Sometimes it is handy to be able to convert a number from one base to another, especially when working with bitwise operations. To help you in that endeavor I present the Base Converter: This movie requires Flash Player 9  

Read the rest of this entry...