home *** CD-ROM | disk | FTP | other *** search
/ What PC? 1997 February / WPCFEB97.ISO / multi / times / data / shared.dir / 00992.ls < prev    next >
Encoding:
Text File  |  1996-08-11  |  5.9 KB  |  232 lines

  1. on clearAllWindows
  2.   global toolWindow, articleWindow, ImageWindow
  3.   if objectp(ImageWindow) then
  4.     set the visible of ImageWindow to 0
  5.   end if
  6.   if objectp(articleWindow) then
  7.     set the visible of articleWindow to 0
  8.   end if
  9.   if objectp(toolWindow) then
  10.     set the visible of toolWindow to 0
  11.   end if
  12. end
  13.  
  14. on doInstall
  15.   global articleWindow, ImageWindow
  16.   if objectp(articleWindow) = 1 then
  17.   else
  18.   end if
  19.   if objectp(ImageWindow) = 1 then
  20.   else
  21.   end if
  22. end
  23.  
  24. on doArtMenu
  25.   global articleWindow
  26.   if objectp(articleWindow) then
  27.     set the visible of articleWindow to 1
  28.     moveToFront(articleWindow)
  29.   end if
  30. end
  31.  
  32. on doImgMenu
  33.   global ImageWindow
  34.   if objectp(ImageWindow) then
  35.     set the visible of ImageWindow to 1
  36.     moveToFront(ImageWindow)
  37.   end if
  38. end
  39.  
  40. on winArticle
  41.   global articleWindow, theArticle
  42.   tell the stage
  43.   end tell
  44.   if objectp(articleWindow) then
  45.     set the visible of articleWindow to 1
  46.     tell articleWindow
  47.       go(1)
  48.     end tell
  49.   else
  50.     cursor(4)
  51.     set horzOrigin to the stageLeft + 20
  52.     set vertOrigin to the stageTop + 50
  53.     set articleWindowRect to rect(horzOrigin, vertOrigin, horzOrigin + 448, vertOrigin + 356)
  54.     set articleWindow to window "articles"
  55.     set the windowType of articleWindow to 49
  56.     set the rect of articleWindow to articleWindowRect
  57.     set the fileName of articleWindow to "article.dir"
  58.     set the title of articleWindow to " "
  59.     set the titleVisible of articleWindow to 0
  60.     open(articleWindow)
  61.     cursor(-1)
  62.   end if
  63.   moveToFront(articleWindow)
  64. end
  65.  
  66. on winImage
  67.   global theImage
  68.   if the name of cast the castNum of sprite the clickOn <> "black.pct" then
  69.     set theImage to the name of cast the castNum of sprite the clickOn
  70.     if char 10 of item 1 of theImage = "p" then
  71.       winPhoto()
  72.     else
  73.       winGraphic()
  74.     end if
  75.   else
  76.     if char 10 of item 1 of theImage = "p" then
  77.       winPhoto()
  78.     else
  79.       winGraphic()
  80.     end if
  81.   end if
  82.   createLocationPhoto()
  83. end
  84.  
  85. on winPhoto
  86.   global ImageWindow, theImage, whWindow
  87.   tell the stage
  88.   end tell
  89.   if objectp(ImageWindow) then
  90.     set photoRect to rect(26, 40, 474, 396)
  91.     if whWindow <> "small" then
  92.       set the rect of ImageWindow to photoRect
  93.     end if
  94.     set the visible of ImageWindow to 1
  95.     tell ImageWindow
  96.       repeat with n = 30 to 44
  97.         set the castNum of sprite n to cast "blank"
  98.       end repeat
  99.       setPuppets(1, 48, 0)
  100.       go(1)
  101.       updateStage()
  102.     end tell
  103.   else
  104.     cursor(4)
  105.     set ImageWindow to window "photos"
  106.     set the windowType of ImageWindow to 49
  107.     set the fileName of ImageWindow to "image.dir"
  108.     set photoRect to rect(26, 40, 474, 396)
  109.     set the rect of ImageWindow to photoRect
  110.     set the title of ImageWindow to " "
  111.     set the titleVisible of ImageWindow to 0
  112.     open(ImageWindow)
  113.     tell ImageWindow
  114.       setPuppets(1, 48, 0)
  115.       go(1)
  116.     end tell
  117.     cursor(-1)
  118.   end if
  119.   set whWindow to "small"
  120.   moveToFront(ImageWindow)
  121. end
  122.  
  123. on winGraphic
  124.   global theArticle, ImageWindow, theImage, menuShowHide, whWindow
  125.   if objectp(ImageWindow) then
  126.     set graphicRect to rect(10, 35, 618, 485)
  127.     if whWindow <> "large" then
  128.       set the rect of ImageWindow to graphicRect
  129.     end if
  130.     set the visible of ImageWindow to 1
  131.     tell ImageWindow
  132.       repeat with n = 30 to 37
  133.         set the castNum of sprite n to cast "blank"
  134.       end repeat
  135.       setPuppets(1, 48, 0)
  136.       go("graphic")
  137.       updateStage()
  138.     end tell
  139.   else
  140.     set ImageWindow to window "photos"
  141.     set the windowType of ImageWindow to 49
  142.     set the fileName of ImageWindow to "image.dir"
  143.     set graphicRect to rect(10, 35, 618, 485)
  144.     set the rect of ImageWindow to graphicRect
  145.     set the title of ImageWindow to " "
  146.     set the titleVisible of ImageWindow to 0
  147.     open(ImageWindow)
  148.     tell ImageWindow
  149.       setPuppets(1, 48, 0)
  150.       go("graphic")
  151.     end tell
  152.   end if
  153.   set whWindow to "large"
  154.   moveToFront(ImageWindow)
  155. end
  156.  
  157. on notepadOpen
  158.   global toolWindow
  159.   if objectp(toolWindow) then
  160.     set noteRect to rect(26, 40, 266, 396)
  161.     set the rect of toolWindow to noteRect
  162.     set the windowType of toolWindow to 49
  163.     set the visible of toolWindow to 1
  164.   else
  165.     set toolWindow to window "tools"
  166.     set the windowType of toolWindow to 49
  167.     set the fileName of toolWindow to "tool.dir"
  168.     set noteRect to rect(26, 40, 266, 396)
  169.     set the rect of toolWindow to noteRect
  170.     set the title of toolWindow to " "
  171.     set the titleVisible of toolWindow to 0
  172.     open(toolWindow)
  173.   end if
  174.   tell toolWindow
  175.     setPuppets(1, 20, 0)
  176.     go("notepad")
  177.   end tell
  178.   moveToFront(toolWindow)
  179. end
  180.  
  181. on keywordOpen
  182.   global toolWindow
  183.   if objectp(toolWindow) then
  184.     set keyRect to rect(26, 40, 474, 396)
  185.     set the rect of toolWindow to keyRect
  186.     set the windowType of toolWindow to 49
  187.     set the visible of toolWindow to 1
  188.   else
  189.     set toolWindow to window "tools"
  190.     set the windowType of toolWindow to 49
  191.     set the fileName of toolWindow to "tool.dir"
  192.     set keyRect to rect(26, 40, 474, 396)
  193.     set the rect of toolWindow to keyRect
  194.     set the title of toolWindow to " "
  195.     set the titleVisible of toolWindow to 0
  196.     open(toolWindow)
  197.   end if
  198.   tell toolWindow
  199.     setPuppets(1, 20, 0)
  200.     go("keyword")
  201.     setPuppets(7, 8, 1)
  202.     moveIndicator2()
  203.   end tell
  204.   moveToFront(toolWindow)
  205. end
  206.  
  207. on helpOpen
  208.   global toolWindow
  209.   if objectp(toolWindow) then
  210.     set helpRect to rect(26, 40, 474, 396)
  211.     set the rect of toolWindow to helpRect
  212.     set the windowType of toolWindow to 49
  213.     set the visible of toolWindow to 1
  214.   else
  215.     cursor(4)
  216.     set toolWindow to window "tools"
  217.     set the windowType of toolWindow to 49
  218.     set the fileName of toolWindow to "tool.dir"
  219.     set helpRect to rect(26, 40, 474, 396)
  220.     set the rect of toolWindow to helpRect
  221.     set the title of toolWindow to " "
  222.     set the titleVisible of toolWindow to 0
  223.     open(toolWindow)
  224.     cursor(-1)
  225.   end if
  226.   tell toolWindow
  227.     setPuppets(1, 20, 0)
  228.     go("help")
  229.   end tell
  230.   moveToFront(toolWindow)
  231. end
  232.