Depending on how dramatic you want the effect to be you might consider using the random() function instead of wiggle(). Something like this could work:
t = Math.round(random(5, 10));
r = value;
if(timeToFrames(time) % t == 0) r += 25;
r;
Since the call to random() is returning a value between 5 and 10 and the time in frames may not always be evenly divisible by the returned value this could result in a long stretch without flashing or several flashes in a row.
Otherwise you could modify a wiggle to do what you’re after with something like this:
w = wiggle(10, 1) - value;
linear(w, .6, .7, value, value + 25);
The ‘w’ variable will have a value that wiggles 10x a second between -1 and 1. You can then linearly interpolate across a small section of that range. The closer together the .6 and .7 values are the faster the transition from ‘value’ to ‘value + 25’. In addition, since the values are wiggling between -1 and 1 the closer to 1 those values are the less frequently a flash will occur. For example, changing the last line to:
linear(w, .8, .9, value, value + 25);
will flash very rarely while:
linear(w, 0, .1, value, value + 25);
will flash very frequently. The ‘sharpness’ of the flashes will be approximately the same.
Darby Edelen