Optimizing As3 Button Code

Hello, how are you all?

Well, this is my first post… so im going to pop that cherry.
I am new to Actionscript, so im jumping directly into AS3. I have a book handy but have noticed, that they really dont include best and optimal practices.

i have 8 buttons, all doing the same thing. my code comes out to something like this…


function moveSelector1(event:MouseEvent) {
    this.animSequence.gotoAndStop(1);
}
function moveSelector2(event:MouseEvent) {
    this.animSequence.gotoAndStop(2);
}
function moveSelector3(event:MouseEvent) {
    this.animSequence.gotoAndStop(3);
}
function moveSelector4(event:MouseEvent) {
    this.animSequence.gotoAndStop(4);
}
function moveSelector5(event:MouseEvent) {
    this.animSequence.gotoAndStop(5);
}
function moveSelector6(event:MouseEvent) {
    this.animSequence.gotoAndStop(6);
}
function moveSelector7(event:MouseEvent) {
    this.animSequence.gotoAndStop(7);
}
function moveSelector8(event:MouseEvent) {
    this.animSequence.gotoAndStop(8);
}
animSequence.stripclub.hit1.addEventListener(MouseEvent.CLICK, moveSelector1)
animSequence.stripclub.hit2.addEventListener(MouseEvent.CLICK, moveSelector2)
animSequence.stripclub.hit3.addEventListener(MouseEvent.CLICK, moveSelector3)
animSequence.stripclub.hit4.addEventListener(MouseEvent.CLICK, moveSelector4)
animSequence.stripclub.hit5.addEventListener(MouseEvent.CLICK, moveSelector5)
animSequence.stripclub.hit6.addEventListener(MouseEvent.CLICK, moveSelector6)
animSequence.stripclub.hit7.addEventListener(MouseEvent.CLICK, moveSelector7)
animSequence.stripclub.hit8.addEventListener(MouseEvent.CLICK, moveSelector8)

Is there any way to optimize this code? You dont have to do it for me, id just like to know the overall concept.

thanks, and the moment i become an expert , i look forward to helping others just like me…

Thanks,

Richard:hoser: