# How to change color of a Movieclip from an external call

**URL:** <https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136>\
**Category:** flash\
**Created:** [August 22, 2003, 7:17pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136 "2003-08-22T19:17:21Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayravin](https://avatars.discourse-cdn.com/v4/letter/b/e95f7d/32.png) [@bayravin](https://forum.kirupa.com/u/bayravin)\
**Post date:** [August 22, 2003, 7:17pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/1 "2003-08-22T19:17:21Z")

</div>

Oh! What a nice forum…

I am using Flash MX in a VB application. Can anyone help me the simplest way to change the color of a movieclip at root level from a VB (Call ShockwaveFlash1) call?

Thanks in advance

---

<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 22, 2003, 7:59pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/2 "2003-08-22T19:59:22Z")

</div>

I’ve only loaded in a hex color with a text file. Would that 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 22, 2003, 11:17pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/3 "2003-08-22T23:17:13Z")

</div>

Yes, I just need to change the color to a hex color from a VB call. Thanks

---

<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 22, 2003, 11:33pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/4 "2003-08-22T23:33:58Z")

</div>

I don’t know what a VB call is, but I’ll tell you how I did it with the txt file. I have a text file called color.txt. In that file, it has only one line that says this:

```php

newColor=336699

```

Then on the first frame of your movie, put in these actions:

```auto

var lv = new LoadVars(), circleColor = new Color(circle);
lv.onLoad = function(success) {
        if (success) circleColor.setRGB("0x"+this.newColor);
}
lv.load("color.txt");

```

Then on your stage, have a movieClip with the instance name of ‘color’. In reality, I’ve actually used this for a nav system for my father who does web design, but doesn’t know flash. He sells this and simply changes the hex color in the text file and then another text file holds the names for the buttons.

Hope that does it for you - sorry I don’t know what VB is. 😉

---

<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 23, 2003, 6:55am UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/5 "2003-08-23T06:55:21Z")

</div>

VB = Visual Basic.

---

<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 23, 2003, 6:39pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/6 "2003-08-23T18:39:26Z")

</div>

VB is Visual Basic,

OK, FreddyThunder, you have thrown some light. I shall try something along those lines. Thanks

---

<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 23, 2003, 8:42pm UTC](https://forum.kirupa.com/t/how-to-change-color-of-a-movieclip-from-an-external-call/29136/7 "2003-08-23T20:42:16Z")

</div>

I actually caught on to that. There’s a tut here on using VB and Flash so I downloaded the zip and played it on my computer and it didn’t do anything - just a box and a button with no function - oh well, I must have done something wrong. :\*(
