AS3 Class Structure

Righto,

It’s only this week had a little practical OOP click into place. Quite the revelation, really, I’ve been trying to hammer this stuff home for years (yes, since 2003) and it’s only recently that the theory materialised on the screen in front of me.

So, having completed my first small project (a scrolling image viewer, out of interest) in what I believe to be reasonable style, I went on the hunt for a project with longer legs.

“Blobs” (“Balls” / “Circles” / whatever), are always popular, and seemed a reasonable place to start; though already I’ve exosed myself to the fact that the new knowledge hasn’t clicked as loudly as it might have done. Try as I might, I just can’t get my head around how to structure this simple project.

There’s an example of a similar end product (for which I’m grateful), here…

Bouncing Balls

… though from the perspective of OOP, this example looks (perhaps only to me) like it was only ever destined to be a quick example.

So, my terribly naive question is this:- Given the SWF above, how would you go about structuring the code beneath to make the project read more clearly, and more scalable?

Hopefully I’ll start a discussion, and please stop laughing…