# Changing Movie clip colour with AS

**URL:** <https://forum.kirupa.com/t/changing-movie-clip-colour-with-as/257671>\
**Category:** flash\
**Created:** [April 16, 2008, 7:55am UTC](https://forum.kirupa.com/t/changing-movie-clip-colour-with-as/257671 "2008-04-16T07:55:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![donnaG](https://avatars.discourse-cdn.com/v4/letter/d/a5b964/32.png) [@donnaG](https://forum.kirupa.com/u/donnaG)\
**Post date:** [April 16, 2008, 7:55am UTC](https://forum.kirupa.com/t/changing-movie-clip-colour-with-as/257671/1 "2008-04-16T07:55:29Z")

</div>

Hello everyone!

I’m trying to get AS to change the colour of several MC’s - but it’s not working…  
I wondered if anyone could please tell me where I’ve gone wrong?

I have 5 large MC squares - when hovered/rolled over they reveal text/colour within. That part works!

What I am trying to achieve is:  
When rolling over 1 of the squares (i.e. sq1) to tint the colour of the other 4 squares to grey - so that the one that is hovered over is full colour, but the other 4 are greyed out. On rollout of sq1, the other 4 grey squares return to their coloured state.

I worked through the Kirupa - Changing Colours with AS tutorial, and tried to apply that to my situation, but I still can’t get it to work…

This is part of the code that I’m using:

```auto
sq1.onRollOver = over;
sq1.onRollOut = out;

function over () {
	myColor = new Color(sq2.sq3.sq4.sq5);
	myColor.setRGB(CCCCCC);

function over () {
	this.gotoAndPlay(2);
}
	
function out () {
	this.gotoAndPlay(7);	
}

```

etc. for each of the squares.

Thank you, any advice would be appreciated! :sigh:  
Donna

CS3 / AS 2.0
