1 Reply Latest reply on Jun 12, 2008 5:24 PM by Newsgroup_User

    Generic behavior to change System Cursors

    charles1965
      -- Generic behavior to change System Cursors
      -- Desktop Xtra 1.0 or later required
      -- Compatibilities: Director 6.x, 7.x, 8.x, Windows

      property Cursors
      property Appstarting, Arrow, Crosshair, Ibeam, No, Sizeall, Sizenesw
      property Sizens, Sizenwse, Sizewe, Uparrow, Wait, Hand


      on getPropertyDescriptionList
      set description = [:]
      set path = the moviePath
      addProp description, #Appstarting, [#default: path & "Appstarting.cur", #format:#string, #comment:"Standard arrow and small hourglass:"]
      addProp description, #Arrow, [#default: path & "Arrow.cur", #format:#string, #comment:"Standard arrow:"]
      addProp description, #Crosshair, [#default: path & "Crosshair.cur", #format:#string, #comment:"Crosshair:"]
      addProp description, #Ibeam, [#default: path & "Ibeam.cur", #format:#string, #comment:"I-beam:"]
      addProp description, #No, [#default: path & "No.cur", #format:#string, #comment:"Slashed circle:"]
      addProp description, #Sizeall, [#default: path & "Sizeall.cur", #format:#string, #comment:"Four-pointed arrow pointing north, south, east, and west:"]
      addProp description, #Sizenesw, [#default: path & "Sizenesw.cur", #format:#string, #comment:"Double-pointed arrow pointing northeast and southwest:"]
      addProp description, #Sizens, [#default: path & "Sizens.cur", #format:#string, #comment:"Double-pointed arrow pointing north and south:"]
      addProp description, #Sizenwse, [#default: path & "Sizenwse.cur", #format:#string, #comment:"Double-pointed arrow pointing northwest and southeast:"]
      addProp description, #Sizewe, [#default: path & "Sizewe.cur", #format:#string, #comment:"Double-pointed arrow pointing west and east:"]
      addProp description, #Uparrow, [#default: path & "Uparrow.cur", #format:#string, #comment:"Vertical arrow:"]
      addProp description, #Wait, [#default: path & "Wait.cur", #format:#string, #comment:"Hourglass:"]
      addProp description, #Hand, [#default: path & "Hand.cur", #format:#string, #comment:"Hand (for Windows2000 or later):"]
      return description
      end

      on getBehaviorDescription
      return " " & ¬
      "- - System Cursors Bahavior - -" & RETURN & ¬
      "Changes all system cursors:"& RETURN & ¬
      "Appstarting, Arrow, Crosshair, Ibeam, No, Sizeall, Sizenesw, Sizens, Sizenwse, Sizewe, Uparrow, Wait, Hand."
      end

      on mouseDown
      -- List of all system desktop icons
      set Cursors = []
      add Cursors, "Appstarting"
      add Cursors, "Arrow"
      add Cursors, "Crosshair"
      add Cursors, "Ibeam"
      add Cursors, "No"
      add Cursors, "Sizeall"
      add Cursors, "Sizenesw"
      add Cursors, "Sizens"
      add Cursors, "Sizenwse"
      add Cursors, "Sizewe"
      add Cursors, "Uparrow"
      add Cursors, "Wait"
      add Cursors, "Hand"
      changeCursors
      end

      on changeCursors
      set cursor = ""
      repeat with i = 1 to count(Cursors)
      do "set cursor="&getAt(Cursors,i)
      set Ok = setSystemCursor (getAt(Cursors,i), cursor)
      if getAt(Ok,1) = 0 then
      -- Ok
      else
      -- Error
      alert("Error: " & getAt(Ok,1) & " - base error code")
      end if
      end repeat
      end
        • 1. Re: Generic behavior to change System Cursors
          Level 7
          ??? What is this ???


          "charles1965" <webforumsuser@macromedia.com> wrote in message
          news:g2j5g0$qlj$1@forums.macromedia.com...
          > -- Generic behavior to change System Cursors
          > -- Desktop Xtra 1.0 or later required
          > -- Compatibilities: Director 6.x, 7.x, 8.x, Windows
          >
          > property Cursors
          > property Appstarting, Arrow, Crosshair, Ibeam, No, Sizeall, Sizenesw
          > property Sizens, Sizenwse, Sizewe, Uparrow, Wait, Hand
          >
          >
          > on getPropertyDescriptionList
          > set description = [:]
          > set path = the moviePath
          > addProp description, #Appstarting, [#default: path & "Appstarting.cur",
          > #format:#string, #comment:"Standard arrow and small hourglass:"]
          > addProp description, #Arrow, [#default: path & "Arrow.cur",
          > #format:#string,
          > #comment:"Standard arrow:"]
          > addProp description, #Crosshair, [#default: path & "Crosshair.cur",
          > #format:#string, #comment:"Crosshair:"]
          > addProp description, #Ibeam, [#default: path & "Ibeam.cur",
          > #format:#string,
          > #comment:"I-beam:"]
          > addProp description, #No, [#default: path & "No.cur", #format:#string,
          > #comment:"Slashed circle:"]
          > addProp description, #Sizeall, [#default: path & "Sizeall.cur",
          > #format:#string, #comment:"Four-pointed arrow pointing north, south, east,
          > and
          > west:"]
          > addProp description, #Sizenesw, [#default: path & "Sizenesw.cur",
          > #format:#string, #comment:"Double-pointed arrow pointing northeast and
          > southwest:"]
          > addProp description, #Sizens, [#default: path & "Sizens.cur",
          > #format:#string, #comment:"Double-pointed arrow pointing north and
          > south:"]
          > addProp description, #Sizenwse, [#default: path & "Sizenwse.cur",
          > #format:#string, #comment:"Double-pointed arrow pointing northwest and
          > southeast:"]
          > addProp description, #Sizewe, [#default: path & "Sizewe.cur",
          > #format:#string, #comment:"Double-pointed arrow pointing west and east:"]
          > addProp description, #Uparrow, [#default: path & "Uparrow.cur",
          > #format:#string, #comment:"Vertical arrow:"]
          > addProp description, #Wait, [#default: path & "Wait.cur",
          > #format:#string,
          > #comment:"Hourglass:"]
          > addProp description, #Hand, [#default: path & "Hand.cur",
          > #format:#string,
          > #comment:"Hand (for Windows2000 or later):"]
          > return description
          > end
          >
          > on getBehaviorDescription
          > return " " & ¬
          > "- - System Cursors Bahavior - -" & RETURN & ¬
          > "Changes all system cursors:"& RETURN & ¬
          > "Appstarting, Arrow, Crosshair, Ibeam, No, Sizeall, Sizenesw, Sizens,
          > Sizenwse, Sizewe, Uparrow, Wait, Hand."
          > end
          >
          > on mouseDown
          > -- List of all system desktop icons
          > set Cursors = []
          > add Cursors, "Appstarting"
          > add Cursors, "Arrow"
          > add Cursors, "Crosshair"
          > add Cursors, "Ibeam"
          > add Cursors, "No"
          > add Cursors, "Sizeall"
          > add Cursors, "Sizenesw"
          > add Cursors, "Sizens"
          > add Cursors, "Sizenwse"
          > add Cursors, "Sizewe"
          > add Cursors, "Uparrow"
          > add Cursors, "Wait"
          > add Cursors, "Hand"
          > changeCursors
          > end
          >
          > on changeCursors
          > set cursor = ""
          > repeat with i = 1 to count(Cursors)
          > do "set cursor="&getAt(Cursors,i)
          > set Ok = setSystemCursor (getAt(Cursors,i), cursor)
          > if getAt(Ok,1) = 0 then
          > -- Ok
          > else
          > -- Error
          > alert("Error: " & getAt(Ok,1) & " - base error code")
          > end if
          > end repeat
          > end
          >