i have been trying to create a random text field appear at the press of the button, but now that i have it do that it is not playing the movie clip that is attached to file. below is what i have so far
}// the main array:
main = [“Your Cool”, “Not today”, “Yes”, “No”, “Your going to die”, "wow ", “six”, “seven”, “eight”, “nine”];
// make a copy of main array to destroy:
for (i=0; i<main.length; i++) {
copy = main.concat();
}
// shuffle the copy by cutting random items out of it,
// and pushing them into an empty holder array(called shuffled):
shuffled = [];
for (i=0; i<main.length; i++) {
shuffled.push(copy.splice(random(copy.length), 1));
}
// make a textfield to display stuff
_root.createTextField(“tf”, 100, 300, 150, 200, 20);
// give the button its instructions:
on (release) {
cookie2.gotoAndPlay(2) ;
_root.bttn.onRelease = function() {
// cut a word off the end of the shuffled array:
blurb = shuffled.splice(shuffled.length-1, 1);
// and display it in the textfield:
_root.tf.text = blurb;
// If there is nothing left in the shuffled copy
// repeat the process:
if (shuffled.length == 0) {
copy = main.concat();
for (i=0; i<main.length; i++) {
shuffled.push(copy.splice(random(copy.length), 1));
}
}
};