2 Replies Latest reply on Mar 31, 2011 10:25 AM by GRAMOPHONE

    Closing Alternative...

    GRAMOPHONE Level 1

      I have a small application where an alert window gives the following options: "Save", "Discard", and "Cancel".

      How can I have an option in the script that the program closes when "Save" or "Discard" is clicked after previously clicking the closing button?

      In other words, how can I track the last sprite clicked?


      Any help in this will be highly appreciated.



        • 1. Re: Closing Alternative...
          Production Monkey Level 3



          -- Lingo syntax
          // JavaScript syntax


          Mouse property; returns the last active sprite clicked by the user.  Read-only.

          An active sprite is a sprite that has a sprite or cast member script  associated with it.

          When the user clicks the Stage, clickOn returns 0. To detect  whether the user clicks a sprite with no script, you must assign a mouse event  script to it so that it can be detected by clickOn. For  example:


          -- Lingo syntax
          on mouseUp me

          Buttons, check boxes, and radio buttons are detected by clickOn even if there is no script attached to them.

          The clickOn property can be checked within a loop. However,  neither clickOn nor clickLoc change value when the  handler is running. The value that you obtain is the value from before the  handler started.

          • 2. Re: Closing Alternative...
            GRAMOPHONE Level 1

            It works GREAT!