# Newbie button code issue

**URL:** <https://forum.kirupa.com/t/newbie-button-code-issue/325017>\
**Category:** Uncategorized\
**Created:** [September 21, 2011, 1:37pm UTC](https://forum.kirupa.com/t/newbie-button-code-issue/325017 "2011-09-21T13:37:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrianau](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Adrianau](https://forum.kirupa.com/u/Adrianau)\
**Post date:** [September 21, 2011, 1:37pm UTC](https://forum.kirupa.com/t/newbie-button-code-issue/325017/1 "2011-09-21T13:37:42Z")

</div>

This is probably a really basic question, since I am newbie at AS3 but I need help.

I have thumbnails in a portfolio slideshow movie clip. Each client featured in the movie clip has three thumbnails that when clicked are to show the corresponding image by going to the labeled frame for that image.

I used the following code on the first client at frame 1:

//“ace\_1” is the instance of the first thumbnail  
ace\_1.addEventListener(MouseEvent.CLICK, ace1);  
function ace1 (event:MouseEvent):void {  
gotoAndPlay(“ace”);  
trace(“moved next”);  
};

//“ace\_2” is the instance of the second thumbnail  
ace\_2.addEventListener(MouseEvent.CLICK, ace2);  
function ace2 (event:MouseEvent):void {  
gotoAndPlay(“ace2”);  
trace(“moved next”);  
};

//“ace\_3” is the instance of the third thumbnail  
ace\_3.addEventListener(MouseEvent.CLICK, ace3);  
function ace3 (event:MouseEvent):void {  
gotoAndPlay(“ace3”);  
trace(“moved next”);  
};

It worked just fine with no error and correct traces (I was so excited :beam:). So I wrote similar code for the next client modifying the instance names and function names and the labeled frames.

anc\_1.addEventListener(MouseEvent.CLICK, anc1);  
function anc1 (event:MouseEvent = null):void {  
gotoAndPlay(“anchor”);  
trace(“moved next”);  
};

anc\_2.addEventListener(MouseEvent.CLICK, anc2);  
function anc2 (event:MouseEvent = null):void {  
gotoAndPlay(“anc2”);  
trace(“moved next”);  
};

anc\_3.addEventListener(MouseEvent.CLICK, anc3);  
function anc3 (event:MouseEvent = null):void {  
gotoAndPlay(“anc3”);  
trace(“moved next”);  
};

This gave me the “1023:Incompatible override” and “1021: Duplicate function definition” errors.

Being a newbie I don’t know what I need to change. I have 14 clients I have to get similar thumbnails working on.

Sure could use some help.  
Thanks.  
Adriana
