A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: setting and removing a tint

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    22

    setting and removing a tint

    hi,
    i have a button changing color onmouseover.
    In some cases i want it to keep the same color, let's say black (even on mouse over).

    so i use

    acolor=new Color( mybutton );
    acolor.setRGB( 0x000000 );

    Now, how can i make it come back to the no-tint state (ie changing color on mouse over) ?
    I tried

    delete acolor;
    or acolor= new Color();

    But the button keeps it black tint.
    Any idea ?

    Thanks
    Quentin

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    I think the only way is starting with a predefined color, and then use it again:

    //first it is blue
    acolor=new Color(myButton);
    acolor.setRGB(0x0066cc);
    //then black
    acolor.setRGB(0x000000);
    //blue again
    acolor.setRGB(0x0066cc);

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