Tag Archives: class

KeyboardControl AS3 Class

Keyboard events are finicky, and AS3 is no exception. They work like regular keyboard strokes anywhere else on your system. Press a key once, and it fires once, but keep it held down and after a short delay it fires repeatedly at a system defined interval. This is how keyboard events should work for text editing, but it does not suffice for something like controlling movement in a game. This is why I developed a class to better handle events for situations like these.

Continue reading KeyboardControl AS3 Class

Parameters AS3 Class

Custom class dependencies: None

This class can be described best as an indexed Object. This means that all the properties may also be accessed through an index, as well as directly calling the property name. It is just about as open ended as a class can get while still maintaining some kind of a structure. It is dynamic , but also extends Proxy in order to control the properties. It is not a Dicitonary, and it is not an Array, but a kind of mix between the 2.

Continue reading Parameters AS3 Class

CountDownTimer AS3 Class

Custom class dependencies: CountdownTimerEvent

Everyone always wants to make a count down to something. This is a class that attempts to enlose all the functionality that is usually needed to achieve this task. There a so many examples and tutorials out there for creating a count down, that I won’t bother explaining much here. I will go into a little about the details of THIS class though.

Continue reading CountDownTimer AS3 Class

DashedLine AS3 Class

Custom class dependencies: None

Flash of course has built-in styles for line strokes, but none of them accomplished what I needed that CSS seems to do so intelligently. This is a simple dashed line drawn pixel for pixel with no antialiasing. This class attempts to make this process easy to use and control.

Continue reading DashedLine AS3 Class

VectorClip AS3 Class

Custom class dependencies: Vector2D

Working with vectors – Part 1, Part 2, Part 3

So far everything done in the series “Working with vectors” have been utilities to help with the calculation of trigonometric values. Now we will apply it to something that will be displayed, a MovieClip! Or in this case, what I call a VectorClip.
Continue reading VectorClip AS3 Class

EventDispatcherList AS3 Class

Custom class dependencies: None

I hope this class will be of as much help to everyone as it is to me. Too many times to count, I needed to manage multiple objects that all use the same listener! Adding the same listener to multiple objects is very useful and code saving in Actionscript 3. Most of the time though when you must do this, you still must manage the adding and removing of those listeners for each individual object. This class attempts to manage that in an more organized yet still open-ended fashion.

The simplest way I can describe it is a list, that you can add and remove listeners for each of its items with one call. It of course is not an Array though because it uses the Dictionary class to hold the data. Continue reading EventDispatcherList AS3 Class