Load dynamic text but not on button

Hi, I have a list of possible responses that I want to appear when a frame is entered. I have the code to make the responses appear and to choose one from the array at random. However when I found the code it was on a button. I want to change it so that the text will appear as soon as the movie moves to that frame. Hope someone can help,
here is the text I am using just now on the button

on (release) {

responses = new Array();
responses.push("A very poor performance");
responses.push("Is a village missing its idiot?");
responses.push("Did you study this topic");

To make it choose one at random I use

n = responses.length;

r = Int(Math.random()*n);


text = responses[r];

}
Cheer Lesley