Buttons with Dynamic Text Labels

I think its fairly self explanitory, but Im looking for a tutorial or a simple script to reuse a movieclip, with a dynamic text field inside. I have the script to place all of the clips but I can’t get the labels to be places. I have the actionscript on the timeline frame one. Would it look something like this:

navButton1.nav_text= “home”;

Am I way off…

You’re almost dead-on.

Just copy/paste each MC instance that contains a dynamic text field we’ll call “myText”. Give each button instance on the stage a name, we’ll go with “button1MC” and “button2MC” for this example.

Then, on the first frame your buttons appear add:

button1MC.onLoad = function() {
this.myText.text = "Button Text";
}

button2MC.onLoad = function() {
this.myText.text = "More Button Text";
}

Just change instance names and text to suit your needs – I think you get the idea. :wink: