# Setting Property in a child clip

**URL:** <https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062>\
**Category:** flash\
**Created:** [November 13, 2002, 5:19am UTC](https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062 "2002-11-13T05:19:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ghandigu](https://avatars.discourse-cdn.com/v4/letter/g/6a8cbe/32.png) [@Ghandigu](https://forum.kirupa.com/u/Ghandigu)\
**Post date:** [November 13, 2002, 5:19am UTC](https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062/1 "2002-11-13T05:19:38Z")

</div>

via “Attachmovie”

my script has created these 3 levels ClipA.ClipB.ClipC

Clip C has a dynamic text box

When the movie loads…  
ClipA creates multiple ClipB’s and then assignes each with a different color  
myColor = new Color(boxname); //boxname = new instance name  
myColor.setRGB(0xAB12B8);

When the mouse hovers over a ClipB it attaches a ClipC which automatically becomes the same color as it’s parent, which is good, except the Text in ClipC becomes the same color and therefore invisible.

I’ve tried using multiple methods, and MANY different places to drop the scipt in order to change text in ClipC

It seems once a new color has been invoked in ClipB, ClipC not only takes it but it can no longer be separated.???

By the by If I do not change the color of ClipB in the script, I can change ClipC;s colors

Is it a lost cause? Need I do this manually?

thx in advance

Ghandigu

---

<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:** [November 13, 2002, 11:19am UTC](https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062/2 "2002-11-13T11:19:30Z")

</div>

can you please post your code, or a sample FLA? It would really 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:** [November 13, 2002, 11:27am UTC](https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062/3 "2002-11-13T11:27:27Z")

</div>

hrmm have u tried using html tags to set the colour of the text?

---

<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:** [November 13, 2002, 4:50pm UTC](https://forum.kirupa.com/t/setting-property-in-a-child-clip/8062/4 "2002-11-13T16:50:25Z")

</div>

I have attached the fla  
the code is below

as you can see by runing the FLA

I can control the color of the text independently for the first 2 and 4th instances. but once I change the color of the parent in the 3rd, i can no longer change the color of the text for it’s child.

thx

////////////////  
/// ClipA /// aka “HMbox”  
//////////////

numvends = 3;  
trace(“working”);  
BBoxHeight = getProperty(this, \_height)-20;  
VendorHeight = BBoxHeight;  
//  
for (t=0; t\<=numVends; t++) {  
this.attachmovie(“NewLine”, “vend”+t, 200+t);  
nameVend = “vend”+t;  
/// x ////  
newx = 150+(t\*100);  
boxxxx = getProperty(this, \_x);  
setProperty(Namevend, \_x, newx);  
}  
myColor = new Color(vend2);  
myColor.setRGB(0xAB12B8);  
//  
myTextFormat = new TextFormat();  
myTextFormat.color = (0x0066FF);  
myTextFormat.backgroundColor = (0x00FF00);  
vendor1.thevendor.oneone.setTextFormat(myTextFormat);  
thevendor.oneone.setTextFormat(Level3Format);  
stop();

////////////////  
/// ClipB /// aka “NewLine”  
//////////////

on (rollOver) {  
this.attachmovie(“vendhover”, “thevend”, 77);  
setProperty(thevend, \_xscale, 30);  
setProperty(thevend, \_yscale, 30);  
setProperty(thevend, \_x, 100);  
thevend.vendhtext = “TEST”;  
Level3Format = new TextFormat();  
Level3Format.bold = false;  
Level3Format.color = (0xD0932F);  
thevend.oneone.setTextFormat(Level3Format);  
}  
on (rollOut) {  
removeMovieClip(thevend);  
}

////////////////  
/// ClipC /// aka “Vendhover”  
//////////////
