3 Replies Latest reply on Nov 25, 2008 9:52 AM by Ned Murphy

    Adding an object

    ACOUSTIFIED
      Im still a bit new at this...
      I am making a simuation of software for my company.
      I have a button that is available thruogh the entire timeline.
      when you click that button it will have a small popup window...
      the challange i have is i think i need to make that popup a movie clip.
      Then i need to figure out the correct onrelease script to make that popup apear over the current screen.
      The trick is there are different background screen it can popup over..

      Am i on the right track? if so what is the corrrect AS for this??
      Im using AS2.

      Thnaks
      J
        • 1. Re: Adding an object
          Ned Murphy Adobe Community Professional & MVP
          Yes, I think you are on the right track.

          popupMC._visible = false; // makes the mc invisible to start

          yourButtonInstanceName.onRelease = function(){
          popupMC._visible = true;
          }
          • 2. Adding an object
            ACOUSTIFIED Level 1
            Duh, I should of known that....haha
            sweet that is awesome thanks..

            One more question.. Is there a way to make it so you cannot click on anything but that popup?
            All the button beneath the popup still are able to be clicked,.

            J
            • 3. Re: Adding an object
              Ned Murphy Adobe Community Professional & MVP
              One way would be to have a function that disables/enables the buttons when you open/close the popup, repsectively.

              example:

              function manageButtons(){
              this.button1.enabled = !this.button1.enabled;
              this.button2.enabled = !this.button2.enabled;
              this.button3.enabled = !this.button3.enabled;
              this.button4.enabled = !this.button4.enabled;
              }

              which could be modified if you actually named your buttons in that manner, to:

              function manageButtons(){

              for(i=1; i<5; i++){
              this["button"+i].enabled = !this["button"+i].enabled;
              }

              }