# Applying colour to duplicateMovieClips

**URL:** <https://forum.kirupa.com/t/applying-colour-to-duplicatemovieclips/222650>\
**Category:** Uncategorized\
**Created:** [April 15, 2007, 8:50pm UTC](https://forum.kirupa.com/t/applying-colour-to-duplicatemovieclips/222650 "2007-04-15T20:50:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenni\_fur](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@jenni\_fur](https://forum.kirupa.com/u/jenni_fur)\
**Post date:** [April 15, 2007, 8:50pm UTC](https://forum.kirupa.com/t/applying-colour-to-duplicatemovieclips/222650/1 "2007-04-15T20:50:30Z")

</div>

Im using the following code from a tutorial to change the color of a movieclip called face, which works fine. But i cant figure out how to apply the following function to duplicate movieclips. I have been struggling with this for ages now. Any help would be super.

for (i=0; i\<5; i++){  
var mcFace = face.duplicateMovieClip(“newclip\_face”+i,i);  
faceArray.unshift(‘newclip\_face’ + i);  
mcFace.\_x = random(500);  
mcFace.\_y= random(500);

}

for (i=0; i\<faceArray.length; i++ ){  
colorSeletction = [0x006699, 0x660000, 0x006666, 0x669900];  
colorTween = 0;

tweenSpeed = .05;

faceColor = new Color(face\*);

face\*.onEnterFrame = function(){

```
colorTween += tweenSpeed;

if (colorTween &gt; 1){
    colorTween--;
    colorSeletction.push(colorSeletction.shift());
}else if (colorTween &lt; 0){
    colorTween++;
    colorSeletction.unshift(colorSeletction.pop());
}

faceColor.blendRGB(colorSeletction[0], colorSeletction[1], colorTween);

```

};

}
