02nd Feb 2005

ActionScript fun

I can’t get into the details of what I am working on, but I’ll comment on a few things I’ve across with ActionScript 2.0 … (sort of as a marker of where I am, so I can come back in a few months and see what I’ve picked up)

MovieClips as Classes: this one still throws me off a little. I’m used to thinking in OOP terms with my C++ background. The fact that a MovieClip can be extended as a class, and it acts as a container AND an object on the stage strikes me as “different”. I think of a class definition as a container, which happens to have graphical objects within it.

Poor MM Support for Dialogs: I’ve written my own window manager for my app. I make my dialogs with a MovieClip acting as a container for all of the little widgets inside it (textfields, a header for dragging the dialog around, buttons, etc.) This is all dynamic. I looked at the Macromedia Popup Window class for about 5 minutes, shrugged in a sort of “you’ve got to be kidding!” manner, and dug into it. It was easier to do this stuff in Motif back in the early 90’s.

Patterns: I’m having fun with Patterns. I’ve modified the Singleton Pattern for a class of dialogs so that: a) I can have multiple “edit this item” dialogs simultaneously, but also b) I never have more than one instance of any given item to be edited. Not sure what the resulting pattern would be called (an “Indexed Singleton”?)

Ignoring The Timeline: I’ve been following the track of doing OOP ActionScript, and haven’t been thinking of the extra dimension of the Timeline. It hits me that it’s a handy method to flip between entire states of a largish app (each with it’s own instance of a window manager…) hmm …

Comments are closed.

grupa LGBT