# AS3 Rookie

**URL:** <https://forum.kirupa.com/t/as3-rookie/261636>\
**Category:** flash\
**Created:** [May 29, 2008, 1:43pm UTC](https://forum.kirupa.com/t/as3-rookie/261636 "2008-05-29T13:43:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Myazaki](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Myazaki](https://forum.kirupa.com/u/Myazaki)\
**Post date:** [May 29, 2008, 1:43pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/1 "2008-05-29T13:43:40Z")

</div>

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.😑

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 29, 2008, 2:19pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/2 "2008-05-29T14:19:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Myazaki](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Myazaki](https://forum.kirupa.com/u/Myazaki)\
**Post date:** [May 29, 2008, 2:48pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/3 "2008-05-29T14:48:29Z")

</div>

Thanks 🙂 it worked 🙂

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:| …

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 29, 2008, 2:57pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/4 "2008-05-29T14:57:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![cloptic](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@cloptic](https://forum.kirupa.com/u/cloptic)\
**Post date:** [May 29, 2008, 3:13pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/5 "2008-05-29T15:13:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Iamthejuggler](https://avatars.discourse-cdn.com/v4/letter/i/ecc23a/32.png) [@Iamthejuggler](https://forum.kirupa.com/u/Iamthejuggler)\
**Post date:** [May 29, 2008, 3:43pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/6 "2008-05-29T15:43:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Myazaki](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Myazaki](https://forum.kirupa.com/u/Myazaki)\
**Post date:** [May 29, 2008, 4:02pm UTC](https://forum.kirupa.com/t/as3-rookie/261636/7 "2008-05-29T16:02:50Z")

</div>

I thorgot that 😑

Thaks!
