# Modifying dynamic text inside Buttons

**URL:** <https://forum.kirupa.com/t/modifying-dynamic-text-inside-buttons/142350>\
**Category:** Uncategorized\
**Created:** [March 28, 2005, 4:12am UTC](https://forum.kirupa.com/t/modifying-dynamic-text-inside-buttons/142350 "2005-03-28T04:12:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![renikm](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@renikm](https://forum.kirupa.com/u/renikm)\
**Post date:** [March 28, 2005, 4:12am UTC](https://forum.kirupa.com/t/modifying-dynamic-text-inside-buttons/142350/1 "2005-03-28T04:12:47Z")

</div>

Hello,

I have a flash project that I’m working on that changes text color depending on the background image loaded. I was able to change all the content text to a different color using dynamic text and code like:

text.setTextFormat(\_global.color\_change)

The problem is that I also have text buttons that need to change color as well. I just can’t seem to change the dynamic text within the button. It seems that i can’t put actionscript inside the button on a layer and I can’t reference the text fomr outside the button.

Any ideas?
