# \[MX\] setRGB inside btn

**URL:** <https://forum.kirupa.com/t/mx-setrgb-inside-btn/30782>\
**Category:** flash\
**Created:** [September 14, 2003, 12:13am UTC](https://forum.kirupa.com/t/mx-setrgb-inside-btn/30782 "2003-09-14T00:13:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Bastos](https://avatars.discourse-cdn.com/v4/letter/f/f05b48/32.png) [@Felipe\_Bastos](https://forum.kirupa.com/u/Felipe_Bastos)\
**Post date:** [September 14, 2003, 12:13am UTC](https://forum.kirupa.com/t/mx-setrgb-inside-btn/30782/1 "2003-09-14T00:13:54Z")

</div>

hey everyone!  
Is it possible to use setRGB inside a btn?  
I have a buttom that has a textfield and a background.  
I want to change only the color of the textfield!

here is the code i`m using:

```auto

function AbtnPress() {
	for (var i=1; i<8; i++) {
		var btn = _root.A["btnA0"+i];
		if (btn == this) {
			var visitedcolor = new Color(this);
			visitedcolor.setRGB(0xFFFFFF);
		}
	}
}
	for (var i=1; i<8; i++) {
		_root.A["btnA0"+i].onPress = AbtnPress;
	}

```

thanks
