Archive | July, 2006

Drawing Shapes in ActionScript 3.0 Tutorial

28 Jul

ActionScript 3.0 has some great new functions to simplify drawing shapes. Previously in ActionScript 2.0 you had to specify each point in a shape and draw lines between them. Now, you can use drawCircle, drawEllipse, drawRect & drawRoundRect to speed up the process. Lets take a look at how it [...]

ActionScript 3.0 Document Class Tutorial

28 Jul

Well, it appears that in my previous posts about ActionScript 3.0, I am a bit old school. I have been instantiating my code from the first frame of the timeline using the import statement. After opening up a few of the as3_labs_samples_062706 and realizing that there is no code on the timeline, just a disclaimer, [...]

No mx classes in Flash 9 Public Alpha?

27 Jul

In the previous post, Debugging in AS3 – Part 2 – Objects, I would have preferred to show you how to debug Objects with the ObjectDumper. The ObjectDumper can be imported using import mx.data.binding.Objectdumper. I tried this in ActionScript 3 and it would not work. I soon realized that all of the mx classes that [...]

Debugging in ActionScript 3.0 – Part 2 – Objects Tutorial

26 Jul

Last post I talked about using trace in order to debug variables in Flash. As I mentioned before, trace works great for Strings and Numbers, but not so good for Objects & Arrays. Tracing an Object will return [object Object], which does not tell you much. To see the insides of an Object you can [...]

Debugging in ActionScript 3.0 – Part 1 – Trace Tutorial

25 Jul

One of the most important things to know about any programming language is how to debug. In ActionScript trace is the most common way to write data into the output window in order to figure out where your program is breaking. Here is an example of using trace in ActionScript 3.0: