# Dynamic Text in buttons

**URL:** <https://forum.kirupa.com/t/dynamic-text-in-buttons/46645>\
**Category:** flash\
**Created:** [March 26, 2004, 11:13am UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645 "2004-03-26T11:13:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nasier](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Nasier](https://forum.kirupa.com/u/Nasier)\
**Post date:** [March 26, 2004, 11:13am UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/1 "2004-03-26T11:13:18Z")

</div>

Can anyone please tell me what I’m doing wrong?

I’ve a button with the instancename “steunen\_btn”.  
In this button there’s a dynamic textfield called “weergave”.

Now when people select another language I want the buttons to change.  
So I thought I make a button with the following AS in it:

```auto
on (press) {
_root.steunen_btn.weergave.text = "SOSTENGA";
}

```

This should change the text in the button to SOSTENGA right?

What am I doing wrong? Why isn’t it working?

Thanx

---

<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:** [August 16, 2004, 10:44am UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/2 "2004-08-16T10:44:25Z")

</div>

I’m in exactly the same situation, trying to sort out a multi language setup. I need to be able to change the text on navigation buttons and in a MC holding the content. Can anyone recommend a technique, before I get too far into the design.

Thanks

---

<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:** [August 16, 2004, 6:40pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/3 "2004-08-16T18:40:00Z")

</div>

If you need to dynamically change the textfields content, use moviclips instead of buttons.

---

<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:** [August 16, 2004, 6:46pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/4 "2004-08-16T18:46:06Z")

</div>

yeah… if you want the text to change… make a fake button, but make it a movieclip… then place a variable on your text in the mc… then make an invisible button on top.

go here.  
[http://www.kirupa.com/developer/mx2004/ani\_smartclipnav.htm](http://www.kirupa.com/developer/mx2004/ani_smartclipnav.htm)

---

<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:** [August 16, 2004, 7:00pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/5 "2004-08-16T19:00:57Z")

</div>

> [@nutthick](#):
>
> I’m in exactly the same situation, trying to sort out a multi language setup. I need to be able to change the text on navigation buttons and in a MC holding the content. Can anyone recommend a technique, before I get too far into the design.
> 
> Thanks

If you want to target a dynamic content in movie clips you must first target the movie clip. this is done thusly (pretend there a mc called “myMovieClip\_mc” and a dynamic text box in the mc called “myText\_txt”

```auto
 
_root.myMovie_mc.myText_txt.text = "all done!";
 

```

---

<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:** [August 16, 2004, 7:18pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/6 "2004-08-16T19:18:21Z")

</div>

here’s what i did… maybe it will 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:** [August 16, 2004, 7:34pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/7 "2004-08-16T19:34:51Z")

</div>

Is that for mx 2004?

---

<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:** [August 18, 2004, 2:29pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/8 "2004-08-18T14:29:41Z")

</div>

I’ve been following the sample given by ubermensch\_ver2 above, and everything works great to change the text. However, as soon as you put some AS behind the button to do something, the ‘button’ transition stops working. It’s the same with the example. Put some code in as ‘onrelease’ and the code executes, but the over/out transition stops. Does anyone know what is going on? I’m on MX2004.

Thanks

---

<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:** [August 26, 2004, 1:17pm UTC](https://forum.kirupa.com/t/dynamic-text-in-buttons/46645/9 "2004-08-26T13:17:52Z")

</div>

Anyone got any ideas on this. My only other option is to create a movie for each language, not something I’m looking forward to
