AS3 Rookie

Hi!

I’m not new to AS2 but to AS3 I’m a complete rookie.

Attached are two versions of a menu that I developed. The AS2 Version is working great, but the AS3 is a disaster. If you test the movie you’ll get this Output:

TypeError: Error #1010: A term is undefined and has no properties.
at AS3Menu_fla::MainTimeline/AS3Menu_fla::frame1()

Please help me understanding what am I doing wrong.:expressionless:

Change the for loop to:

for (var i:Number = 0; i<=aItemsMenu.length -1; i++)

it’s trying to access a part of the array that doesn’t exist.

Thanks :slight_smile: it worked :slight_smile:

Now how do I make this part work.

function mouseEventClick(event:MouseEvent):void {
trace(“Click Working”);
this.gotoAndStop(2);
}

…this was so simple in AS2:| …

That will work, it’s just that you don’t have a frame 2 on your timeline. :slight_smile:

this.gotoAndStop(2);

“this” in your code is a relative reference to the main timeline.
you have to reference the instance name of the child mc.

Ah yeah, if you are trying to go to frame 2 of the menu items Cloptic is correct. I assumed you were trying to navigate around the root timeline.

I thorgot that :expressionless:

Thaks!