-
set RGB in timeline?
I have a timeline with a movie clip symbol moving across the screen. At the end of the timeline I have a go to and play (1) so that the timeline loops. That part works fine. I want the color of the symbol to change each time the timeline loops. I put a set RGB random action at the end of the timeline.
The problem is everytime my timeline hits the setRGB action it does change the color the way I want it to but it stops the timeline from playing. It always stops the timeline playing whereever I put the setRGB action. Is there a way to get the timeline to keep playing after this?
Thanks.
-
-
Thanks, here it is...
myColor = new Color(Sailboat);
myColor.setRGB(random(256) << 16 | random(256) << 8 | random(256));
gotoAndPlay(1);
This is on the last keyframe on my timeline. It does change the color randomly but then it just sits there.
If I put the gotoAndPlay(1); at the top it does change the color and goes to frame 1 but then it still just sits there at frame 1 and doesn't play.
Thanks again.
-
PHP Code:
R = random(256);
G = random(256);
B = random(256);
colorHexString = R.toString(16)+G.toString(16)+B.toString(16);
colorhex = parseInt(colorHexString,16);
myColor = new Color(fillColor);
myColor.setRGB(colorHex);
gotoAndPlay(1);