3 Replies Latest reply on Feb 21, 2007 5:17 AM by Newsgroup_User

    Making the stage draggable

    tristram23
      Is it possible to make a projector that doesn't have the visible bar or min/max/close options but is still draggable on screen. I need to create an options screen for language choice etc but this needs to be smaller than the full interface size and it needs to be moveable so that people can refer to other documents easily.

      Many thanks
      Tristram
        • 1. Re: Making the stage draggable
          Level 7
          Create a graphic that will be the hot spot for dragging and attach this
          behavior to it.

          property pS, pUp, pDn, pMode, pClickPoint

          on beginSprite me
          pS = sprite (me.spriteNum)
          pUp = pS.member.name
          pDn = pUp & ":down"
          pMode = #off
          pClickPoint = point (0, 0)
          end

          on mouseEnter me
          cursor 260
          end

          on mouseLeave me
          cursor -1
          end

          on mouseDown me
          pMode = #on
          cursor 290
          pS.blend = 30
          pClickPoint = the clickLoc
          end

          on mouseUp me
          pMode = #off
          cursor 260
          pS.blend = 20
          end

          on mouseUpOutside me
          cursor -1
          end

          on exitFrame me
          if pMode = #on then
          relativePoint = the mouseLoc - pClickPoint
          hValue = relativePoint [1]
          vValue = relativePoint [2]
          currRect = the activeWindow.rect
          deskTopRect = the deskTopRectList [1]
          newLeft = min (max (the activeWindow.rect [1] + hValue, deskTopRect
          [1] - 50), deskTopRect [3] - 50)
          newTop = min (max (the activeWindow.rect [2] + vValue, deskTopRect [2] +
          5), deskTopRect [4] - 25)
          newRight = newLeft + currRect.width
          newBottom = newTop + currRect.height
          newMenuWindowRect = rect (newLeft, newTop, newRight, newBottom)
          (the stage).rect = newMenuWindowRect
          end if
          end


          --
          Craig Wollman
          Lingo Specialist
          Word of Mouth Productions
          212-928-9581

          www.wordofmouthpros.com
          "tristram23" <webforumsuser@macromedia.com> wrote in message
          news:erh109$clv$1@forums.macromedia.com...
          > Is it possible to make a projector that doesn't have the visible bar or
          > min/max/close options but is still draggable on screen. I need to create
          > an
          > options screen for language choice etc but this needs to be smaller than
          > the
          > full interface size and it needs to be moveable so that people can refer
          > to
          > other documents easily.
          >
          > Many thanks
          > Tristram
          >


          • 2. Re: Making the stage draggable
            tristram23 Level 1
            That works perfectly, thanks very much!
            • 3. Re: Making the stage draggable
              Level 7
              You're welcome.

              --
              Craig Wollman
              Lingo Specialist
              Word of Mouth Productions
              212-928-9581

              www.wordofmouthpros.com
              "tristram23" <webforumsuser@macromedia.com> wrote in message
              news:erhbp0$qar$1@forums.macromedia.com...
              > That works perfectly, thanks very much!