The following plugin function is supported:
| command(cmd,rnd,delim) |
| cmd | VRSmarty command | example: 'pano.pan=[-150 - -35],5000,elastic' |
| rnd | random function | optional, 'second', 'minute', 'hour', 'weekday', 'day' or 'month' see below |
| delim | delimiter | optional, default=, (comma), see below |
NOTES:
If you want to randomize a VRSmarty command, just do like this:
- Replace the value or the string in your command that you want to randomize with [...] (see below).
- Send it to the randomize.swf plugin.
- The plugin will replace the bracket [...] with a random value and execute the command.
The [...] bracket content can have
two different formats:
| 1. | A numeric range - specify a range of numeric values (with the lower value first) |
| example: [-800 - -20] (spaces are ignored) |
| The plugin will generate a random value within this range. |
| |
| 2. | A set of choices |
| example1: [goPanoA,goPanoB,goPanoC] (spaces are taken as any other character) |
| example2: [17,43,5,22,9,31] (spaces are taken as any other character) |
| The plugin will make a random selection of one of the given choices. There is no limit for the number of choices.
|
You can use
several brackets [...] in the same command.
The
rnd parameter can be used to control the random choice:
| second | The current second (0-59) |
| minute | The current minute (0-59) |
| hour | The current hour of the day (0-23) |
| day | The current day of the week (0-6) |
| date | The current day of the month (0-30) |
| month | The current month (0-11) |
The random choice is then calculated by
random_value % no_of_choices. So, if you have set the rnd parameter
to 'hour' and have 6 different choices, the plugin will start with the first choice immediately after midnight, change every
hour, and go back to the first one again after six hours ...and so on.
The default choice list
delimiter is "," (comma). But if any of your choices contains a comma, you can set the
delim parameter for using almost any other character or string that does not interfere with your choices or
with VRSmarty parsing.
Version history: