3 Replies Latest reply on Jun 28, 2007 1:24 PM by Shad0wdrag0n

    problem with dynamic text

    Shad0wdrag0n
      I seem to be having trouble with some dynamic text boxes in the flash game I'm working on. I have a number of flash movies that load into a single main movie (using the loadMovieNum code). The problem I'm having is that when you click on a button in the game it 's supposed to increase your character's health and decrease his gold (see the code below). Although the code I'm using will alter the two variables, the dynamic text linked to those variables wont show the changes until the flash movie either changes to a different scene, or a new movie is loaded into the main movie. The problem may be that the variables are located in the main flash movie, while the dynamic text boxed are located in each of the loaded movies. I want it to work this way so that the health and gold variables will carry over into all the loaded movies. Is there any wy I can get the dynamic text to show the changes to their linked variables immediately when the variables are changed?

      If the above is too confusing I can upload a zip of the flash files I'm working on and post a link to it here.
        • 1. Re: problem with dynamic text
          Damon Edwards Level 3
          "the dynamic text linked to those variables wont show the changes until the flash movie either changes to a different scene, or a new movie is loaded into the main movie."

          you could use some sort of interval or onEnterFrame to refresh this
          • 2. Re: problem with dynamic text
            Shad0wdrag0n Level 1
            How do you use onEnterFrame to refresh dynamic text?
            • 3. problem with dynamic text
              Shad0wdrag0n Level 1
              OK, I decided to move the dynamic text boxes into the main movie. I had to remove the _global. part of the variables though. It seems that dynamic text boxes can't find _global. variables if they're in the same movie. Unfortunately, removing the _global. parts means I can't get actions in the loaded movies to alter the variables in the main movie. How do I get an action in a loaded movie to change a variable in the main movie without having _global. in front of the variables? If that isn't possible how do I get the dynamic text boxes to find _global. variables when they're all in the same movie? Would it help if I put up a zip of the files I'm working on somewhere and post a link to it here? That way you all can see what I'm trying to do.