Random Numbers and Layers

Thanks to the generosity of a forum member, I have created a button that uses java script to return a random number between 1 and 10. Using the random number that is generated, I would like to show the corresponding layer. Random Number 1 = Layer 1 etc. Each layer is to display a spinning while animation. If this topic has already been covered in another post, please point me towards the solution. Thanks.

1 Reply
Kumar Agarwal

Hi Katherine,

First you will need to setup 10 layers with unique names.

then you need to create 10 triggers similar to this:

Action: show layer

layer: the layer you want to show

when: timeline starts

object: the slide you are working on

click 'show conditions'

click the '+' icon

AND/OR: AND

List: Variables

If: variable with random number in it

Operator: == Equal to

type: value

value: the value you want the random number to be when you want to show the layer you selected earlier in the trigger menu.

Here is a storyfile, I did not use a random number. However it shows the setup of the layers and triggers.

Enjoy,

Kumar