I put this as a variable definition in the frame’s code
Color = new Color(image);
Color.setRGB(Math.random(16777215));
then i attached this code to the symbol itself
onClipEvent(enterFrame){
this.Color
}
and now it turns them all black … which means the color set is working but it’s not choosing a new random color each time.
and about it being executed 20 times a second. I have stops on each frame. the movie chooses one of 32 frames to randomly stop on but I want each frame to have a different color clip on it so I want it to set the color randomly each time it enters the frame
enterFrame has nothing to do with the timeline or frames.
It just executes the actions as fast as the frames per second
the timeline may not play but it still executes them so fast.
and try making the setRGB action like this:
**myColor** = new Color(<movielip>);
**myColor**.setRGB(**0x**+(**Math.random()*(16777215/11)**));
but 0x in front of the color value and I think you need to change the Color too cuz a function is named that way too. But maybe you don’t need to change it… experiment
also, i think i’ve seen this somewhere before but i tried it and i couldnt make it work although i’m sure it’s my syntax. if it’s expecting hex why couldn’t i do random(x*ffffff) ?
Shuga, just a comment, if you don’t mind. Even Repeat visitors to your site will not notice that your rocks are random. I really like the concept, maybe you should change the rocks at randon intervals, or have them show up periodically…dunno… Again, nice concept.