Problem with 2 arrays. Code posted

I have 2 different arrays. array1 and array2. I also have 2 different buttons that load questions from the 2 different arrays into a text area called “questions”. I can’t quite figure out the code on the buttons to make it work right. It only loads the last question of the array. I want to just start at the beginning of the each array and work my way down to the last question. Here’s some of my code.

In the frame as:

a = array1.length;
c = array2.length;
b = 0
d = 0

On button 1:

on (press) {
	if(b<a){
	question = (array1**);
	}
	else{
		b=0;
		question = (array1**);
	}
b=b+1;
}

On button 2:

on (press) {
	if(d<c){
	question = (array2[d]);
	}
	else{
		d=0;
		question = (array2[d]);
	}
d=d+1;
}

Any help with this would be much appreciated :slight_smile:

Thanks!