Button not working

all this resides on frame 2 of the root timeline.


stop ();
//create new array named rules
var rules:Array = new Array();
rules [0] = "Hello and welcome";
rules [1] = "This is a test array";

//tells storybox.txt to display first item in array
rules_mc.storyBox_mc.storyBox_txt.text = rules[0];

//sets event listener for button
rules_mc.storyBox_mc.nextBtn_mc.addEventListener (MouseEvent.CLICK, nextStatment);
rules_mc.storyBox_mc.nextBtn_mc.buttonMode = true;


//function for event listener
function nextStatment (event:MouseEvent):void
{
    var index:Number = 0;

//holds lenght of rules array
    var arrayLen:Number = rules.length;

//increase index value on click
    index++;


    rules_mc.storyBox_mc.storyBox_txt.text = rules[index];
//shows the current indes of the rules array in text field   

 if (index == rules.length)
    {
// if the index number is the same as the array length go to next frame on root imeline.
        gotoAndPlay ("setup");
    }

}

my problem is that when i click my button the array length and the index number are never the same so it will never go to the next frame any way i can get around this little predicament?