-
hope you can help me
i have made a menu, now i try to give them different bg colors on release.
this works good. i made 5 variables with the rgb values etc.
now i want to make the colors random
to test this before i make the random function i made this:
on (release) {
/:farbegeben = Number (/:color add 4);
_root.actions.farbe.setRGB(/:farbegeben);
}
the variable output is this
_level0.farbegeben = 1.#QNAN
instead of
_level0.farbegeben = 16751052 or 0xff99cc
the variable is /:color4
thx for trying to help me
marcel
-
Hi..
Place this code on the first frame of your menu MC:
function randColor () {
c = new Color(this);
r = (Math.random()*256);
g = (Math.random()*256);
b = (Math.random()*256);
c.setRGB(r << 16 | g << 8 | b);
}
Now target it using:
on (release) {
menu.randColor();
}
Good luck.
-
thx a lot works just great
thx a lot man
you've been a great help
it works brilliant
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|