This will change the colour of a clip to random values between #000000 and #ffffff every second (converted to base 10 rather than hex so it's easier to generate the random number), all you need is a clip on the stage with instance name 'myClip'...
function doRandomColour(clip) {
myColor = new Color(clip);
var colourCode = Math.round(Math.random()*16777216);
myColor.setRGB(colourCode);
}
//
setInterval(doRandomColour, 1000, myClip);
//
stop();
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.