# setRGB Halts my movie - WHY?

**URL:** <https://forum.kirupa.com/t/setrgb-halts-my-movie-why/29647>\
**Category:** flash\
**Created:** [August 29, 2003, 12:03am UTC](https://forum.kirupa.com/t/setrgb-halts-my-movie-why/29647 "2003-08-29T00:03:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SnorkyFrog](https://avatars.discourse-cdn.com/v4/letter/s/d2c977/32.png) [@SnorkyFrog](https://forum.kirupa.com/u/SnorkyFrog)\
**Post date:** [August 29, 2003, 12:03am UTC](https://forum.kirupa.com/t/setrgb-halts-my-movie-why/29647/1 "2003-08-29T00:03:38Z")

</div>

I have reduced this down to the simplest movie I can think of!

In my FLA I have a red circle that is a movieclip on frame 1 on the stage.

I am simply moving it across the stage.

It works just fine.

However, when I want to change its color in Actionscript using the following in frame 1,

var newColor = “0x00FF00”;  
var colorful = new Color("\_root.myCircle");  
colorful.setRGB(newColor);

my movie stops at frame 1 and will not continue.

Anyone know why this is behaving this way?

I swear someone could write a book three times as thick as Moock’s by simply documenting all the weird behaviors of Flash!

---

<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 29, 2003, 2:34am UTC](https://forum.kirupa.com/t/setrgb-halts-my-movie-why/29647/2 "2003-08-29T02:34:39Z")

</div>

i think your problem is in the var colorful… line  
AS is thinking that the name of the object is actually “\_root.myCircle” instead of \_root.myCircle

there is a difference. try using this line instead:

```auto
var colorful = new Color(_root.myCircle);

```

---

<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 29, 2003, 4:34am UTC](https://forum.kirupa.com/t/setrgb-halts-my-movie-why/29647/3 "2003-08-29T04:34:48Z")

</div>

Nope. Tried that earlier. It makes no difference.

No matter how you are moving a movieclip (tweening or setting it’s location frame by frame) as soon as you call setRGB, that movieclip stops moving! (Haven’t tried moving it using Actionscript yet but I assume that would work.)
