Creating a random word generator

I saw the random number generator that Lance did before but i would like to create one with words. They should be able to click on something which gives them a word or phrase, then they can pick the feelings and thinking that go with that word or phrase.

I haven't even started working on the slide for it yet, as I am just trying to figure out if i can do it with the question bank or if i need a java degree lol...any help would be appreciated.

14 Replies
Brian Dennis

The "random" part will need to be javascript. I suppose you could have your random words/phrases on different layers, then set conditional triggers on each layer (e.g. Show Layer if random_number_selected == # (where # is 1..number of layers to pick from).

The javascript to generate a random number looks quite a bit like:

Math.floor(Math.random() * 4)

where the four represents the number of possible words/phrases. You'd need to assign this value to a numeric project variable; say something like "random_number_selected"

Setting variables from javascript is provided in the knowledgebase javascript information

Matthew Bibby

Tamra, am I right in guessing that you have a list of words you'd like this to work with? 

Brian's approach would work good (he's  a pretty smart bloke)... but if your list of words is long it may be easier to do this all in JavaScript and just return the word rather than having lots and lots of layers.

Tamra Schnyder

Well we tried something, which did not work I am going to attach the story here, it is slide 4.8 I believe. I know the code works, we tried it in dreamweaver, but neither of us know much about how to put it in articulate, so the code is there, I am just not sure how to make it work. Thanks for any help you can give me.