hi there
i wonder if there is a possibility to chang e the color of an object. in flash mx, you have access to the property with getRBG and setRGB, but with 3dfa it doesn't work.
Printable View
hi there
i wonder if there is a possibility to chang e the color of an object. in flash mx, you have access to the property with getRBG and setRGB, but with 3dfa it doesn't work.
I dont think you can.
But if you make three copies of your object and always have the same x,y co-ordinates they lie on top of each other.
Then in a function call Change(R,B,G) you can call an set their opacity values
try this
thanks for reply.
i tried a cuple of things and this idea works good, but there is one prob:
the order of the elements. if the topelement has a alpha of 100% you can't see the others anymore. it's a pity, that we can't change the order with scripting, or have i missed something?
You can change the order of elements if you are using clones of them.
When creating a new clone it will be placed on top of all other elements. If you want to bring an element to front, delete the old clone and create a new one.
Okay, if you want to place the element in the back it is more complicated, because you have to create new clones of all the other elements.
Look at the example I gave, it actually 5 skins B G R B G
If you need 80% red you set the R to 0.80 but since it wont let the rearmost thru you then set the top three etc so
0.0 0.0 0.8 0.1 0.1
it you wanted 80% Green then
0.0 0.8 0.1 0.1 0.0
80% blue requires
0.8 0.1 0.1 0.0 0.0