A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Tinting an object: How to go back to Non tint state?

  1. #1
    Senior Member
    Join Date
    Nov 2001
    Posts
    174

    Tinting an object: How to go back to Non tint state?

    HI, im using Flash MX 2004

    I have an MC which i want to change color when I drag an object over it. I can get it to take a dynamic tint, with a specified color and opacity(alpha), but when i rollOff the MC, how do i get it to go back to having NO color.

    Here is the code for the rollOver function

    if (component._rollType[arrayPointer] == "tint") {
    var myColor = new Color(objectMousedOver);
    myColor.setRGB(component._tintColor);
    objectMousedOver._alpha = component._tintOpacity;
    }

    And here is the current code for the rollOff function

    if (component._rollType[arrayPointer] == "tint") {
    var myColor = new Color(objectMousedOver);
    myColor.setRGB(0);
    objectMousedOver._alpha = 100;
    }

    I have no idea wat to stick into the 'setRGB' call in the rollOff function, because the original MC has NO color, it is just a clip on the stage.

    Is there a better way to do this??

    Does Flash 8 have better color functionality?

    Cheerz,
    Dwayne

  2. #2
    Senior Member
    Join Date
    Nov 2001
    Posts
    174
    No ideas?

    Cheerz,
    Dwayne

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