# Checking for dynamic text and performing action

**URL:** <https://forum.kirupa.com/t/checking-for-dynamic-text-and-performing-action/273964>\
**Category:** Uncategorized\
**Created:** [October 23, 2008, 4:17am UTC](https://forum.kirupa.com/t/checking-for-dynamic-text-and-performing-action/273964 "2008-10-23T04:17:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glow](https://avatars.discourse-cdn.com/v4/letter/g/f0a364/32.png) [@glow](https://forum.kirupa.com/u/glow)\
**Post date:** [October 23, 2008, 4:17am UTC](https://forum.kirupa.com/t/checking-for-dynamic-text-and-performing-action/273964/1 "2008-10-23T04:17:18Z")

</div>

Hi everyone I need some help with this code.

I have this button, who’s text is loaded dynamically, the button text is inside an mc, I need for the dynamic text’s mc to be invisible when no dynamic text is loaded and visible when text is loaded.

Currently the button on its visible state sits on frame label “on” and I’ve created another frame labeled “off”, I just don’t know how to put together the action to make the frame switch to “off” when no dynamic text is loaded to make the button invisible.

I tried doing this:

```auto
if (_root.buttons.bt1.btn1mc.text1 == "") {
	_root.buttons.bt1.gotoAndStop("on");	
	} else {
       stop();
	}

```

but it didn’t work

any help would be appreciated.
