home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global theArticle, theArticleList
- setPuppets(1, 48, 0)
- setPuppets(13, 19, 1)
- cursor(4)
- setDelimOn()
- if item 3 of theArticle = 0 then
- setOffStage("17")
- else
- set the locV of sprite 17 to 4
- set the locH of sprite 17 to 115
- end if
- if item 4 of theArticle = EMPTY then
- setOffStage("18")
- else
- set the locV of sprite 18 to 4
- set the locH of sprite 18 to 144
- end if
- createPath("article", item 1 of theArticle)
- openXLib("fileio")
- set thetextfile to FileIO(mnew, "read", the result)
- if objectp(thetextfile) then
- set artTemp to thetextfile(mReadFile)
- set topBoxTemp2 to line 3 of artTemp & "," && line 5 of artTemp & RETURN & line 7 of artTemp
- set artHeadTemp to item 2 of theArticle
- if char length(artHeadTemp) of artHeadTemp = "┬╗" then
- delete char length(artHeadTemp) - 1 to length(artHeadTemp) of artHeadTemp
- end if
- delete line 1 to 8 of artTemp
- set the text of field "artHead" to artHeadTemp
- set the text of field "artHead2" to topBoxTemp2
- set the text of field "artText" to artTemp
- thetextfile(mdispose)
- closeXLib("fileio")
- else
- set the text of field "artHead" to string("Sorry - article not found - " && theArticle)
- set the text of field "artText" to "Sorry - article not found"
- set the text of field "artHead2" to "Sorry - article not found"
- end if
- if voidp(theArticleList) then
- set theArticleList to theArticle & RETURN
- else
- repeat with n = 1 to the number of lines in theArticleList
- if string(line n of theArticleList) = string(theArticle) then
- delete line n of theArticleList
- end if
- end repeat
- put theArticle & RETURN after theArticleList
- if the number of lines in theArticleList > 76 then
- delete line 1 of theArticleList
- end if
- end if
- setDelimOff()
- end
-