# Movieclip Tint

**URL:** https://forum.kirupa.com/t/movieclip-tint/28132
**Category:** flash
**Created:** [August 10, 2003, 4:32pm UTC](https://forum.kirupa.com/t/movieclip-tint/28132 "2003-08-10T16:32:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)
#### Post date: [August 10, 2003, 4:32pm UTC](https://forum.kirupa.com/t/movieclip-tint/28132/1 "2003-08-10T16:32:56Z")

</div>

Hi,

I have an image inside a movieclip, with the alpha set to 30%. Now I’d want to be able to change the tint (like Hue from Photoshop) of that movieclip on button press. I figured it might be possible by creating a new movieclip, putting a transparant square in it and changing the \_alpha and color on buttonpress, but isn’t it possible to do directly change the tint of the movie with the image inside with actionscript ?

I tried senocular’s method ([http://proto.layer51.com/d.aspx?f=615](http://proto.layer51.com/d.aspx?f=615)), but my movie turned all pink instead of red tranparant. Can anyone help me with this ?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 10, 2003, 6:26pm UTC](https://forum.kirupa.com/t/movieclip-tint/28132/2 "2003-08-10T18:26:25Z")

</div>

[AS]var myColor = new Color(myMovieClip);  
myColor.setTransform({rb:255, aa:30});[/AS]  
[http://www.macromedia.com/support/flash/action\_scripts/actionscript\_dictionary/actionscript\_dictionary146.html](http://www.macromedia.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary146.html)

That should do…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 10, 2003, 6:31pm UTC](https://forum.kirupa.com/t/movieclip-tint/28132/3 "2003-08-10T18:31:43Z")

</div>

Yup, that does it. Thanks kax 🙂 How do you clear the setTransform ? When I click another button, it adds the tranparancy instead of changing it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 10, 2003, 7:10pm UTC](https://forum.kirupa.com/t/movieclip-tint/28132/4 "2003-08-10T19:10:06Z")

</div>

[AS]myColor.setTransform({rb:0, aa:100});[/AS]  
😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2003, 7:24am UTC](https://forum.kirupa.com/t/movieclip-tint/28132/5 "2003-08-11T07:24:28Z")

</div>

That didn’t work. This worked though:

[AS]  
var clearColor = new Color(\_root.bg);  
clearColor.setTransform({rb:0,gb:0,bb:0, aa:100});  
var redColor = new Color(\_root.bg);  
redColor.setTransform({rb:100, aa:30});  
[/AS]

Thanks for the help =)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 11, 2003, 7:31am UTC](https://forum.kirupa.com/t/movieclip-tint/28132/6 "2003-08-11T07:31:50Z")

</div>

No problem, I guess…

That makes absolutely no sense, though. The default value for gb and bb, is zero!! You shouldn’t have to set them to zero again. 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 16, 2003, 6:11am UTC](https://forum.kirupa.com/t/movieclip-tint/28132/7 "2003-08-16T06:11:13Z")

</div>

Oh, I see, I forgot to mention that I have three buttons 😊 A red, a blue and a green one. So I had to set everything back to zero before changing it 🙂 You couldn’t now I had three buttons, it worked for one 🙂

Thanks Kax 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 16, 2003, 7:23am UTC](https://forum.kirupa.com/t/movieclip-tint/28132/8 "2003-08-16T07:23:44Z")

</div>

It makes sense now… 😛

You’re welcome. 😉
