4 Replies Latest reply on May 19, 2009 3:19 PM by wwscoper

    using variables in input text fields nested in a movieclip

    wwscoper Level 1

      Hi all,

       

      I am designing a roulette wheel type game. I am using a variable, "_global.myMoney = 0; " to keep track of the total money the player has. When I built the prototype, I used a dynamic text field on the stage with an instance name of "myMoney_text" and a variable of "_root.myMoney"

       

      Now, I need to move this text box into a movie clip with an instance name of "winnings_mc"

       

      When I test the movie, it looks like it showing the style sheet (font size, font, etc...) inside the dynamic text box. If I change the variable of the box to "_root.winnings_mc.myMoney" it seems to track initially, but now my updateMoney function in my main script does not work.

      The function is called like this:

       

      trace("updated money equals " + updateMoney(myMoney));

       

      This always traces zero now, the initial value.

       

      Any ideas?

       

      Thanks!