1 Reply Latest reply on Sep 21, 2006 2:42 AM by Newsgroup_User

    Showing and Hiding Movie Clips

      I have a map that shows the location of several buildings. If the user clicks on "Building 1" a box will appear giving more info about that building. Then, if the user clicks on "Building 2" I would like the "Building 1" info box to disappear and then show the "Building 2" info box.

      There will be a number of buildings, so basically I am looking for an easy way to show a building's information then hide it when the user wants to see another building's info.

      Currently I just have the code that toggles each building's info on and off. Below is a sample of the code that toggles a building's info box.

      on (release) {
      building1._visible = !building1._visible;

      Does anyone have any ideas how this can be done. Each building's information box is a movie clip. Each building has a button which shows or hides the its info box.

        • 1. Re: Showing and Hiding Movie Clips
          Level 7
          Set a reference to the currently 'on' info box. Use that reference to turn
          off the current info box, and reassign to the one you have just turned on

          on (release) {
          mcCurrentInfoBox._visible = false;
          building1._visible = true;
          mcCurrentInfoBox = building1;

          Remove '_spamkiller_' to mail