Archive for Nuts & Bolts

Problems with Tween and Using TweenLite

Monday, July 5th, 2010

Have you had trouble with Adobe’s Tween class? (Used for so called “easy” ActionScript animation of display objects) I sure have, so I thought I’d write a post about it. When I was first taught how to animate with ActionScript, I had many a lock up and stutter from the Tween class. For awhile I was quite annoyed, seeing theĀ benefitĀ of animation using ActionScript but thinking that it was totally unreliable. Now there are a number of methods to fix the problems with Tween, using Dictionaries, new objects and so on; all of which seemed tedious and time consuming. Thankfully, I found a better solution, third party tweening engines! I’m going to tell you about what I think is the best one, TweenLite.

Categories : Nuts & Bolts
Comments (0)

How to Pad a Number with Zeros + Simple Counter

Tuesday, May 25th, 2010

At some point you may need to display a number that must always occupy a predetermined number of character spaces. An example would be a rolling game timer with a 5 digit display. For example, when the timer hits 33 seconds, the digits would display like so: 0 0 0 3 3

Categories : Nuts & Bolts
Comments (0)

How to use Classes in your Project

Thursday, April 1st, 2010

Many of the examples that I use in my blog come in the form of a “Class” file. Without going into too deep an explanation, I will attempt to explain how to implement a class into your project. The following is a class for our example:

Categories : Nuts & Bolts
Comments (0)

How to dispatch a custom event

Thursday, March 11th, 2010

This is going to be a very simple example of how to dispatch an event. In actionscript 3, you dispatch an event by extending the EventDispatcher class. I’m not going to get into a big complicated explanation right now, but I will show you a couple of simple examples.

Categories : Nuts & Bolts
Comments (6)