3 Replies Latest reply on May 25, 2006 3:40 PM by blemmo

    if statement help

    cwick34
      Ok, code will follow, here is the question: I have a list of dynamic text fields, and another nested clip that I want to find the first empty text field and if the assigned text isn't already used, populate that emplty text field...I am also sure that this function can be shortened up ALOT, I just want it to work. I don't care how much code is involved since this will only be run locally.

      Here is the current code:


      All of this is working, I just don't want "IMPAC Card Recon" to show up twice if the button is pressed 2,3,4 or more times....

      Thanks for the help!
        • 1. Re: if statement help
          truly_great
          What about making that particular button invisible when clicked or turning off this onRelease programming when they click the button? That way, they wouldn't be able to click it more than once.

          Thia
          • 2. Re: if statement help
            cwick34 Level 1
            I have tried changing the _visible to false but it doesn't seem to work inside of a button...anyone know how I can do that? Either change the _visible of a button or turn off the ability to click it?
            • 3. if statement help
              blemmo Level 1
              You can use the 'enabled' property of a button or an MC to disable it. The button needs an instance name, then you can use
              buttonname.enabled = false;
              to deactivate it. To reactivate, just set enabled to true.

              The if statements could be made into a for loop that checks all text fields and inserts the text in the first field that has no text assigned. Code is attached.

              hth,
              blemmo