// RANDOMIZE // Prototype for a random color // Author: Broly (Davide Beltrame) // E-mail: davb86@libero.it Color.prototype.randomize = function(){ var trans = new Object() trans.ra = random(100) trans.ga = random(100) trans.ba = random(100) trans.rb = random(255) trans.gb = random(255) trans.bb = random(255) this.setTransform(trans) } //Syntax //create a color object colore = new Color(mc) //Exec the function on the color colore.randomize()