# Dynamic text with button

**URL:** https://forum.kirupa.com/t/dynamic-text-with-button/301848
**Category:** Uncategorized
**Created:** [December 16, 2009, 7:17pm UTC](https://forum.kirupa.com/t/dynamic-text-with-button/301848 "2009-12-16T19:17:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aa72](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@aa72](https://forum.kirupa.com/u/aa72)
#### Post date: [December 16, 2009, 7:17pm UTC](https://forum.kirupa.com/t/dynamic-text-with-button/301848/1 "2009-12-16T19:17:33Z")

</div>

Hi!

I’m trying to have a button with dynamic text to change the name for each button. Here is the code I entered (btn is my button, and btn0 is my dynamic text field):

```auto
btn.btn0.text="Work";

```

but here is the output error I receive:

TypeError: Error #1009: Cannot access a property or method of a null object reference. at MadP2\_2\_fla::MainTimeline/frame1()

I will be so grateful for any help!  
Thanks
