A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: color changing

  1. #1
    Member
    Join Date
    Aug 2002
    Location
    Switzerland
    Posts
    71

    color changing

    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.
    Bruno

    www.tonetube.ch

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Posts
    136
    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
    Last edited by carnwath; 04-29-2003 at 05:57 PM.

  3. #3
    Senior Member
    Join Date
    Mar 2003
    Posts
    136
    try this
    Attached Files Attached Files

  4. #4
    Member
    Join Date
    Aug 2002
    Location
    Switzerland
    Posts
    71

    element order

    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?
    Bruno

    www.tonetube.ch

  5. #5
    '''''''''''''''''
    Join Date
    Mar 2003
    Location
    Germany
    Posts
    29
    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.
    Malte

  6. #6
    Senior Member
    Join Date
    Mar 2003
    Posts
    136
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center