Hello again Zack,
Sorry to hear that my last bit of advice confused you. Also sorry if you were hoping for someone else
lol. There are only two of us that regularly answer Flash/ActionScript questions on these forums and Blizzard is busy with other things currently, it seems.
Anyway, to your questions...
I don't even know where to put this code, would it go at the end where the actions tell the movie to stop?
Well, I don't know how your movie is set up so I can't answer that. It would go on the same frame as you have that text field.
If you need the text to change sequentially, then there isn't an "easy" solution. In order to track the order, you'll have to implement some sort of external method (probably cookies in conjunction with either PHP -- or another server side script -- or javascript).
If you just want the text to change randomly, then it's fairly "easy". Just take the AS that I have written below and put it on the same frame as the text field. I've uploaded a simple example here to show you how it would look. You can download the Flash 8 .fla source file here.
So here is the actionscript (in a slightly different syntax to make it easier to understand):
Code:
var fruits = new Array();
fruits[0] = "APPLES";
fruits[1] = "GRAPES";
fruits[2] = "ORANGES";
fruits[3] = "PEARS";
fruits[4] = "BANANAS";
var randomNumber = Math.round(Math.random()*(fruits.length-1));
text_field.text = fruits[randomNumber]
A few things to note:
a) the text field must be set to "Dynamic Text" in the properties panel.
b) if you're using a non-standard font, be sure to embed it
Hope it helps
Bookmarks