home *** CD-ROM | disk | FTP | other *** search
- on searchword
- global rval, son, gsword, rnum
- set rval to EMPTY
- set son to 1
- set rnum to 0
- set tp to numtoframe(the frame)
- set svar to field tp
- repeat with ind = 1 to the number of lines in gsword
- set gstemp to line ind of gsword
- repeat with index = 1 to the number of words in svar
- if word index of svar starts gstemp then
- set rnum to rnum + 1
- put index into line rnum of rval
- end if
- end repeat
- end repeat
- set tst to value(line 1 of rval)
- if (tst <= the number of words in svar) and (rnum <> 0) then
- hilite word value(line 1 of rval) of field tp
- setmatch()
- else
- switchmatch(2064)
- end if
- end
-
- on nextword
- global son, rval, rnum, gframe
- set son to son + 1
- set tp to gframe + 104
- set svar to field tp
- set checkval to value(line son of rval)
- if checkval <> EMPTY then
- hilite word checkval of field tp
- end if
- setmatch()
- end
-
- on prevword
- global son, rval, gframe
- set son to son - 1
- set tp to gframe + 104
- set svar to field tp
- set checkval to value(line son of rval)
- if checkval <> EMPTY then
- hilite word checkval of field tp
- end if
- setmatch()
- end
-
- on nextcard
- global gmatchlistnum, gscardon, gmatchlist
- setoff(0)
- set gscardon to gscardon + 1
- if gscardon > gmatchlistnum then
- set t to 1
- set gscardon to 1
- end if
- set fnum to frametonum(word 2 to the number of words in line gscardon of gmatchlist of line gscardon of gmatchlist)
- go(fnum)
- searchword()
- end
-
- on prevcard
- global gmatchlistnum, gscardon, gmatchlist
- setoff(0)
- set gscardon to gscardon - 1
- if gscardon = 0 then
- set t to 1
- set gscardon to gmatchlistnum
- end if
- set fnum to frametonum(word 2 to the number of words in line gscardon of gmatchlist of line gscardon of gmatchlist)
- go(fnum)
- searchword()
- end
-
- on setoff what
- global goff
- set goff to what
- end
-
- on setmatch
- global gmatchlistnum, rnum, son, goff
- if goff = 1 then
- if gmatchlistnum > 1 then
- switchmatch(2064)
- else
- switchmatch(2060)
- end if
- exit
- end if
- if gmatchlistnum = 1 then
- if rnum = 1 then
- switchmatch(2060)
- else
- if rnum = son then
- switchmatch(2063)
- else
- if son = 1 then
- switchmatch(2061)
- else
- if (rnum > 1) and (son < rnum) then
- switchmatch(2062)
- end if
- end if
- end if
- end if
- else
- if rnum = 1 then
- switchmatch(2064)
- else
- if rnum = son then
- switchmatch(2067)
- else
- if son = 1 then
- switchmatch(2065)
- else
- if son < rnum then
- if rnum > 1 then
- switchmatch(2066)
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on switchmatch num
- puppetSprite(42, 1)
- set the castNum of sprite 42 to num + 3000
- updateStage()
- end
-
- on gencor
- set xloc to the mouseH - the locH of sprite 42
- set yloc to the mouseV - the locV of sprite 42
- if yloc < 0 then
- if xloc < -5 then
- return 1
- else
- if xloc > 5 then
- return 2
- else
- return 0
- end if
- end if
- else
- if yloc < 16 then
- if xloc < -5 then
- return 3
- else
- if xloc > 5 then
- return 4
- else
- return 0
- end if
- end if
- end if
- end if
- return 0
- end
-
- on writemark
- global gWriteobject, marklist, dloc
- set gWriteobject to FileIO(mnew, "write", dloc)
- gWriteobject(mWriteString, string(marklist))
- gWriteobject(mWriteString, "@")
- gWriteobject(mdispose)
- end
-