2 Replies Latest reply on Jan 3, 2007 4:43 AM by Jenks07

    Visibility problem

    Jenks07
      I'm currently using Director MX 2004, basically I'm wanting the mouse pointer to click on an object, and when the object has been clicked, for it to disappear. The problem comes when the sprite doesnt return at the start of a new game. What code could I use to make it re-appear at the start of a new game? I'm currently using

      on mouseUp
      sprite(2).visible = FALSE
      end

      to get the objects to dissappear. Any help would be greatly appreciated.
        • 1. Re: Visibility problem
          Level 7
          When the new game starts, make it always set all of the parts'
          visibility back to true. If there are only a few things, then it may be
          easiest to put a script like this on the "reset button" (or whatever is
          used to start the game over)

          sprite(2).visible=true
          sprite(3).visible=true
          ..etc...

          If there are a lot of them, then put a handler like this in the script
          for those objects

          on resetVisibility me
          sprite(me.spriteNum).visible=true
          end

          and on your rest button, put this command to do all of them at once:

          sendAllSprites(#resetVisibility)
          • 2. Re: Visibility problem
            Jenks07 Level 1
            thanks alot man, i've got it working.

            Greatly appreciated