# (Flash 8) Replacing color fill in movieclips?

**URL:** https://forum.kirupa.com/t/flash-8-replacing-color-fill-in-movieclips/204526
**Category:** Uncategorized
**Created:** [October 20, 2006, 2:51pm UTC](https://forum.kirupa.com/t/flash-8-replacing-color-fill-in-movieclips/204526 "2006-10-20T14:51:05Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![signalnoise](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/signalnoise/32/2892_2.png) [@signalnoise](https://forum.kirupa.com/u/signalnoise)
#### Post date: [October 20, 2006, 2:51pm UTC](https://forum.kirupa.com/t/flash-8-replacing-color-fill-in-movieclips/204526/1 "2006-10-20T14:51:05Z")

</div>

Hello all.

I have another small question regarding dynamic color in movieclips. Essentially, I am looking for a way to find a color within a movieclip (like #999999 in the below sample) and replace that color with something else (like #ffd223).

[COLOR=Red]But, I want the stroke around the circle to remain [/COLOR][COLOR=Red]untouched.[/COLOR] So, the script would only find a certain fill, and color only that area.

![](http://www.signalnoise.com/transit/fill.jpg)

I tinkered with the \*beginFill \*method but couldn’t get it working. Any ideas would be much appreciated. =)

(Sorry about the double post. Something messed up on me here.)

– james

---

<div class="post-metadata">

### Author: ![signalnoise](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/signalnoise/32/2892_2.png) [@signalnoise](https://forum.kirupa.com/u/signalnoise)
#### Post date: [October 23, 2006, 12:28pm UTC](https://forum.kirupa.com/t/flash-8-replacing-color-fill-in-movieclips/204526/2 "2006-10-23T12:28:11Z")

</div>

Hi Twin. Not exactly, but I appreciate your suggestion.

If I had multiple colors in a movieclip, I don’t want to have to put each on it’s own layer (very time-consuming). So I’m curious if there is a way using actionscript to target a specific RGB value and switch it up with another.

---

<div class="post-metadata">

### Author: ![Kraken](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kraken/32/2910_2.png) [@Kraken](https://forum.kirupa.com/u/Kraken)
#### Post date: [October 23, 2006, 6:05pm UTC](https://forum.kirupa.com/t/flash-8-replacing-color-fill-in-movieclips/204526/3 "2006-10-23T18:05:49Z")

</div>

You could use the BitmapData.threshold method for something like that. Or the floodFill, but that will give you jaggies.
