0 Replies Latest reply on Oct 10, 2006 8:38 AM by Winston2

    code re-use question

    Winston2 Level 1
      I'm a newb at actionscript but I am making progress so here's my question. I wanted to create a text button (no background rectangle-just text) that moved and changed color as the user rolls over and out of it. Therefore I created a dynamic text field, then encapsulated it in a mc then encapsulated the mc in another mc. The result is fine and it does what I want it to do. Here's the code on the root timeline that makes it work.

      b1.buttText.buttonText.text = "New Stuff";

      function over() {

      function out() {

      My question is "if I create another button, like b2, for example, how can I keep from having to copy all the function code above? I played around with 'this' a little but couldn't seem to get it to work. Many thanks.