//    Instruction Example :      button.persistence.set (objectid,long)


        screen.resolution.set (512,384)

        screen.set (BACK)
          pattern.display ("avo\bubble.gif")
        screen.end ()

        @button=button.load ("avo\button_01.btn")
        button.display (@button,256+20,CENTER,Event.Manager,All)

        screen.set (FRONT)
          text.display ("Press a key to set the persistence of the button.",CENTER,10)
          text.color.stack (COLOR_RED)
          text.display ("Press ESCAPE to exit.",CENTER,350)
        screen.end ()

        repeat ()

          !angle+=1.5
          button.position.set (@button,240+80*number.sin.get (!angle),140+80*number.cos.get (!angle))

          if (keyboard.get ())
          keyboard.set (OFF)

            %i+=1
            switch (%i mod 3)
              case (0)
                button.persistence.set (@button,OFF)
              case (1)
                button.persistence.set (@button,ON)
              case (2)
                button.persistence.set (@button,PERSISTENCE_TRAILS)
            end switch ()

            screen.set (FRONT)
              switch (button.persistence.get (@button))
                case (OFF)
                  text.display ("The persistence of the button is : OFF   ",CENTER,30)
                case (ON)
                  text.display ("The persistence of the button is : ON    ",CENTER,30)
                case (PERSISTENCE_TRAILS)
                  text.display ("The persistence of the button is : TRAILS",CENTER,30)
              end switch ()
            screen.end ()

          endif ()

          time.wait (0.01)

        until (keyboard.get ()==KEY_ESCAPE)

        script.stop ()

        procedure Event.Manager (@event,%status)
        end procedure