home *** CD-ROM | disk | FTP | other *** search
- on CrSlidePuz
- global CySlidePosList
- if (the mouseH > 386) and (the mouseH < 579) and (the mouseV > 63) and (the mouseV < 254) then
- repeat while (the mouseH > 386) and (the mouseH < 579) and (the mouseV > 63) and (the mouseV < 254)
- repeat with f = 1 to count(CySlidePosList)
- set WhichBox to getAt(getAt(CySlidePosList, f), 1)
- if rollOver(WhichBox) and the mouseDown then
- set Dotx to getAt(getAt(CySlidePosList, 1), 3)
- set Doty to getAt(getAt(CySlidePosList, 1), 4)
- set Boxx to getAt(getAt(CySlidePosList, f), 3)
- set Boxy to getAt(getAt(CySlidePosList, f), 4)
- if ((((Dotx + 1) = Boxx) or ((Dotx - 1) = Boxx)) and (Doty = Boxy)) or ((((Doty + 1) = Boxy) or ((Doty - 1) = Boxy)) and (Dotx = Boxx)) then
- set DotLocx to getAt(getAt(CySlidePosList, 1), 5)
- set DotLocy to getAt(getAt(CySlidePosList, 1), 6)
- set BoxLocx to getAt(getAt(CySlidePosList, f), 5)
- set BoxLocy to getAt(getAt(CySlidePosList, f), 6)
- if Dotx < Boxx then
- repeat while the locH of sprite WhichBox <> DotLocx
- set the locH of sprite WhichBox to the locH of sprite WhichBox - 1
- updateStage()
- end repeat
- else
- if Dotx > Boxx then
- repeat while the locH of sprite WhichBox <> DotLocx
- set the locH of sprite WhichBox to the locH of sprite WhichBox + 1
- updateStage()
- end repeat
- else
- if Doty < Boxy then
- repeat while the locV of sprite WhichBox <> DotLocy
- set the locV of sprite WhichBox to the locV of sprite WhichBox - 1
- updateStage()
- end repeat
- else
- if Doty > Boxy then
- repeat while the locV of sprite WhichBox <> DotLocy
- set the locV of sprite WhichBox to the locV of sprite WhichBox + 1
- updateStage()
- end repeat
- end if
- end if
- end if
- end if
- set the loc of sprite WhichBox to point(DotLocx, DotLocy)
- set the loc of sprite 3 to point(BoxLocx, BoxLocy)
- updateStage()
- setAt(getAt(CySlidePosList, f), 3, Dotx)
- setAt(getAt(CySlidePosList, f), 4, Doty)
- setAt(getAt(CySlidePosList, f), 5, DotLocx)
- setAt(getAt(CySlidePosList, f), 6, DotLocy)
- setAt(getAt(CySlidePosList, 1), 3, Boxx)
- setAt(getAt(CySlidePosList, 1), 4, Boxy)
- setAt(getAt(CySlidePosList, 1), 5, BoxLocx)
- setAt(getAt(CySlidePosList, 1), 6, BoxLocy)
- end if
- end if
- end repeat
- end repeat
- end if
- end
-