Important note on AS2 properties

I neglected to mention this important point in OOP4AS2#2 – when creating array or object properties for classes, you must initialize them in your constructor as with “goodList” below. The “badList” array property below will share the same data amongst all instances of the class:

class MyList {
var goodList:Array;
var badList:Array = new Array();
MyList = function() {
goodLlist = new Array();
}
}

Bokel has a good description of the issue, with some sample code here.

OOP4AS#3: Constructors

Installment 3 will build on the previous 2 parts (so if you haven’t read them already, you should), by taking a look at how to create a constructor function for a class in ActionScript 2.0.

A constructor lets you pass in parameters when you create a new instance of a class, and use those parameters to set properties and carry out operations on the new instance as it’s created.

Read on…
Continue reading →

Global search and replace

This has got to be one of the coolest new features in Flash MX2004: Global Search and Replace. Go to Edit, and select “Find…” and you will be shown the new search and replace panel. You can search for virtually any type of asset in your entire FLA: Text (script and/or text content), Images, Sounds, Fonts, etc.

While it still seems a little buggy, and it’s a shame it has no undo capability, or the ability to search on an entire project, it sure will save me a lot of time. I don’t know how much of my short life I’ve wasted hunting in vain for the final occurence of a font in a FLA, trying to eliminate the extra 20kb added to the SWF because I’m using both bold Arial and Arial Bold.

Goodbye Movie Explorer!!

Support your user group…

Just wanted to make a quick post asking people to support their user groups if possible by purchasing MX2004 through the affiliate program. If your user group doesn’t have a banner up, email the manager.

If you’re not part of a user group, but don’t want those affiliate dollars going to line Macromedia middle management’s pockets 😉 – the Edmonton Flash User Group could definitely put them to good use – just click this link, and click the Macromedia Affiliate banner at the top of the page before purchasing your software from MM.

A little house cleaning

Following my move to NetKeepers hosting, I had a lot of links and content go down for two reasons:

1) Case sensitivity on the new server

2) All of my ASP scripts are now useless

I’ve just gone through and fixed most problems caused by number 1, and will be learning either CF or PHP (most likely the latter, but I welcome comments) to fix number 2.

The 1000+ of you who tried to download gPathFinder while the link was broken will be happy to learn it is now back up. Grab it from the gskinner.com site in lab / source / FLA / pathfinder.

OOP4AS2#1: Classes and instances

This post on classes and instances begins my little expos� on ActionScript 2.0 and Object Oriented Programming. I won’t be going into tons of detail (for that you’ll have to buy the forthcoming “FlashMX 2004 Demystified” book from Macromedia Press!), but I’ll be giving a basic introduction.

I’ll also be covering a lot of these materials at FlashParade in October, and more briefly at the next Edmonton Flash User Group meeting on September 15.

Read on for the real content… 🙂
Continue reading →

Lots of OOP in AS2.0 goodness

In one month FlashParade in Marseille will be starting off, and it looks to be a great conference in a beautiful location! I’ll be there, speaking on Object Oriented Programming for ActionScript 2.0 – which coincidentally is the topic of the chapter I contributed to the forthcoming “Macromedia Flash MX 2004 Demystified” from Macromedia Press.

In order to whet your taste for both of them, I’m going to be running an expos� on OOP in AS2.0 on my blog. Over the next couple of weeks, I will be posting serial content on the new OOP keywords and methodologies found in Flash MX 2004 and ActionScript 2.0. I’ll be starting a little later today with the class keyword, and posting new content at least every couple days.

It won’t be completely detailed – but you know where to go for that: the book, or the conference. 🙂

I’ll also point you to some good resources for learning general OOP as I go.