XM Magdalena 3D print, GGeorgy (3D)
LC #42 Pipers Alley

View Full Version : Actionscript 1 and Moveclip subclass help

01-31-2004, 05:18 PM
I'm trying to make my life easier by learning OOP (Object Oriented Programming) for Actionscript. So far, it has just made it more complicated.

I'm trying to create a menu system for my website. Here's the coding I have so far:

//menuItemClass constructor

function menuItemClass() {

menuItem.prototype = new MoveClip();

menuItem.prototype.ini(angle) {
this.angle = angle;
this.baseH = this._height;
this.baseW = this._width;

menuItem.prototype.move(tarAngle) {
//Complicated movement calculations I won't bore you with;


gallery = _root.menuItem1;

Bascially, menuItemClass() is a subclass of MovieClip(). The ini() function of menuItemClass initializes the instance's location (since I don't know how to pass arguments to the constructor from inside of the attachMovie() function), and move() moves the instance to a specific spot on the stage based on some calculations. The only problem is it doesn't work. The menuItem instance gets attached to _root, but it just sits at (0,0) on the Stage.

I should point out that I'm using Flash MX with AS1, not Flash MX 2004 with AS2. I found the tutorial on Macromedia's Developer.net that explains how to do this in AS2.

Any help, or a pointer towards a reference, would be much appreciated.

Thanks in advance.

02-01-2004, 02:05 AM
i'm not sure if you already know this site, but i think http://www.actionscripts.org/ might be some sort of help?

Sorry for wasting your time if it doesn't do any help.

Ian Jones
02-01-2004, 06:41 AM
Ok, I haven't investigated too deeply into AS yet, but this lnk should be useful:


Btw, you should really use a search engine. That took me 5 seconds to find with Google.

02-02-2004, 07:16 PM
Ian, thanks for your help, but that site didn't answer my question, just so you know. You might want to understand the question before you insult someone :)

Ian Jones
02-03-2004, 12:30 AM
Bleh... your not worth the time.

CGTalk Moderation
01-17-2006, 08:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.