3 Replies Latest reply on Jul 3, 2009 8:58 AM by Ned Murphy

    problem with setting variable/array

    pascal80_d

      hello,

       

      in a flash template i found several buttons with almost the same action script code. on pressing the button a window popup with different text (for each button a unique text).

      the following code is in the code section of the buttons, only the two last codelines are different for each button.

       

      on (release)
      {
      _root.scrHEIGHT = 200;
      _root.scroller.scroller.gotoAndStop(2);
      _root.scroller._x = 100;
      _root.scroller._y = 90;
      _root.TM_title = "Info Box";
      _root.READ = 22;
      }

       

      so i think that the input of the unique text for each button is handled in the last line "_root.READ = 22".

      i also found in the bibliothek the belonging text parts. my problem now is that i dont know where the connection is set between the text part and the array/variable READ. in this case the connection is 22, but i dont found any property in the text part or in the property of the button where the connection is set to 22. i use flash cs4. anyone know could help me?

       

      thank you very much,

      pascal

        • 1. Re: problem with setting variable/array
          Ned Murphy Adobe Community Professional & MVP

          You said you were able to locate the text parts in the library.  What about them involves the numbers you see?  Right click on them and look at their Properties and Linkage.

           

          Also, what do you find at _root.scroller.scroller frame 2?

          • 2. Re: problem with setting variable/array
            pascal80_d Level 1

            when i look for the second frame in scroller.scroller i noticed that the texts are connected with a single frame. _root.READ = 22 means "go to frame 22 an show the text".

             

            thanks alot, i asked the same question in the biggest two german flash forums and noone had an answer or a hint!

            • 3. Re: problem with setting variable/array
              Ned Murphy Adobe Community Professional & MVP

              You're welcome.  For the code you showed, the scroller was the only thing that could have involved some kind of action taking place, so that's why I asked. Everything else was just a static assignment.  I would have had that line last in the lineup just for the logical flow to make sense.  Since the code will execute before any timeline travel is done, it works, but having that line last would have helped in making sense of it.