View Full Version : Help with Actionscript OOP

01 January 2004, 02:24 PM
Okay, my idea is the basically try to create a subclass of Movieclip so that I can have pre-defined motion. I'm trying to have movieclip objects that spin in a circle dynamically, ie I can set the angle of the target movie clip, and the movie clips rotate around so that that movieclip is in focus. I hope I am making some sense.

Anyways, here's my coding so far...

//menuItem constructor

function menuItemClass() {


menuItem.prototype.move = function (tarAngle) {
//big long complicated move function

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


Okay, I'm using AS1, and I just re-typed my code in, so ignore things like splelnig erorrs :)

Here's the thing that I want to be able to do. Basically create a new function for those specific movie clips ("menuItem"), that will calculate it's exact position. So far, no luck. I've tried saying "_root.menuItem1.move(45);" for instance, which should move it to the 45degree angle of the circle, but it just sits there in the upper left corner of the stage.

Any help, or direction to a resource, would be much appreciated.

CGTalk Moderation
01 January 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.