home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1996 July / macformat-039.iso / DATABASE / SHARED.DIR / 01005.ls < prev    next >
Encoding:
Text File  |  1996-03-14  |  11.9 KB  |  334 lines

  1. on GoPictArticle
  2.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting, gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings, gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps, gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv, gMakerNum, gQTpath, gSoundpath, gNuggetTime, gNuggetDelay, gNameCastnum, gCurPic
  3.   set picsprite to 9
  4.   set cuttingsprite to 6
  5.   set titlesprite to 8
  6.   set papersprite to 11
  7.   set datesprite to 12
  8.   set captionsprite to 7
  9.   set forwardbutton to 20
  10.   set backbutton to 19
  11.   set headsprite to 10
  12.   set namesprite to 4
  13.   set headloch to gHeadlocH
  14.   set the locH of sprite headsprite to headloch
  15.   puppetSprite(forwardbutton, 0)
  16.   puppetSprite(backbutton, 0)
  17.   puppetSprite(papersprite, 0)
  18.   set oldframelabel to the frameLabel
  19.   set the text of field "caption-pic" to " "
  20.   set the text of field "caption-pic2" to " "
  21.   if not (the frameLabel contains "pic") then
  22.     unpuppet("4,10")
  23.   else
  24.     puppetSprite(captionsprite, 0)
  25.   end if
  26.   set piccastname to gMakerNum & "-" & gCurChap & "." & gCurArticle
  27.   set piccast to the number of cast piccastname
  28.   put gMakerNum & "-" & gCurChap & "." & gCurArticle
  29.   if value(gMakerNum) = 119 then
  30.     set PictFrame to "pict.MAT"
  31.     set PictFrame2 to "pict2.MAT"
  32.   else
  33.     set PictFrame to "pict"
  34.     set PictFrame2 to "pict2"
  35.   end if
  36.   if piccastname = "96-3.6" then
  37.     go("pict2")
  38.   else
  39.     if ((gWorld = "design") or (gWorld = "senses") or (gWorld = "mind")) and (piccast > 0) then
  40.       if the width of cast piccast >= the height of cast piccast then
  41.         go(PictFrame2)
  42.       else
  43.         go(PictFrame)
  44.       end if
  45.     else
  46.       go(PictFrame)
  47.     end if
  48.   end if
  49.   CleanMem()
  50.   set gCurPic to piccast
  51.   if (gWorld = "Senses") or (gWorld = "Design") then
  52.     set the locH of sprite namesprite to gNameLoch
  53.     set the locV of sprite namesprite to gNameLocv
  54.   end if
  55.   puppetSprite(captionsprite, 1)
  56.   set captionloch to the locH of sprite captionsprite
  57.   set the locH of sprite captionsprite to 1000
  58.   puppetSprite(picsprite, 1)
  59.   set the locH of sprite picsprite to 1000
  60.   updateStage()
  61.   if ((gWorld = "senses") or (gWorld = "Design")) and (the frameLabel = PictFrame2) then
  62.     set the castNum of sprite captionsprite to the number of cast "caption-pic2"
  63.   else
  64.     set the castNum of sprite captionsprite to the number of cast "caption-pic"
  65.   end if
  66.   set tmpcap to GetCaption()
  67.   if ((gWorld = "senses") or (gWorld = "design")) and (the frameLabel = PictFrame2) then
  68.     set the text of field "caption-pic2" to tmpcap
  69.     set the textHeight of field "caption-pic2" to 18
  70.   else
  71.     set the text of field "caption-pic" to tmpcap
  72.   end if
  73.   set the textHeight of field "caption-pic" to 18
  74.   if gWorld = "Senses" then
  75.     set the textHeight of field "caption-pic2" to 25
  76.   end if
  77.   set the text of field "cutting" to " "
  78.   set the text of field "title" to " "
  79.   if gWorld = "Power" then
  80.     set centerpoint to 265
  81.   else
  82.     if gWorld = "senses" then
  83.       set centerpoint to 275
  84.     else
  85.       if gWorld = "discover" then
  86.         set centerpoint to 250
  87.       else
  88.         set centerpoint to 300
  89.       end if
  90.     end if
  91.   end if
  92.   if (gWorld <> "Senses") and (gWorld <> "Body") then
  93.     set caph to the height of cast "caption-pic"
  94.     if gWorld = "Design" then
  95.       if the frameLabel = "pict2" then
  96.         set caph to the height of cast "caption-pic2"
  97.         set the locV of sprite captionsprite to centerpoint - (caph / 2)
  98.       end if
  99.     else
  100.       set the locV of sprite captionsprite to centerpoint - (caph / 2)
  101.     end if
  102.   else
  103.     if gWorld = "Body" then
  104.       set the locV of sprite captionsprite to 112
  105.     end if
  106.   end if
  107.   if piccast > 0 then
  108.     set the stretch of sprite picsprite to 0
  109.     set the castNum of sprite picsprite to piccast
  110.     set w to 1.0 * the width of cast piccast / 2
  111.     set h to 1.0 * the height of cast piccast / 2
  112.     if gWorld = "design" then
  113.       if the width of cast piccast > the height of cast piccast then
  114.         set the locH of sprite picsprite to 98 + w
  115.         set the locV of sprite picsprite to 131 + h
  116.         set the locH of sprite captionsprite to 493
  117.       else
  118.         set the locH of sprite picsprite to 275 + w
  119.         set the locV of sprite picsprite to 480 - h
  120.         set the locH of sprite captionsprite to 138
  121.       end if
  122.     else
  123.       if gWorld = "power" then
  124.         set the locH of sprite captionsprite to captionloch
  125.         if the width of cast piccast > the height of cast piccast then
  126.           set the locH of sprite picsprite to 640 - w
  127.           set the locV of sprite picsprite to 146 + h
  128.         else
  129.           set the locH of sprite picsprite to 256 + w
  130.           set the locV of sprite picsprite to 72 + h
  131.         end if
  132.       else
  133.         if gWorld = "discover" then
  134.           set the locH of sprite captionsprite to captionloch
  135.           if the width of cast piccast > the height of cast piccast then
  136.             set the locH of sprite picsprite to 250 + w
  137.             set the locV of sprite picsprite to 421 - h
  138.           else
  139.             set the locH of sprite picsprite to 250 + w
  140.             set the locV of sprite picsprite to 421 - h
  141.           end if
  142.         else
  143.           if gWorld = "senses" then
  144.             if the width of cast piccast > the height of cast piccast then
  145.               set the locH of sprite picsprite to 191 + w
  146.               set the locV of sprite picsprite to 46 + h
  147.             else
  148.               set caph to the height of cast "caption-pic"
  149.               set the locV of sprite captionsprite to centerpoint - (caph / 2)
  150.               set the locH of sprite picsprite to 191 + w
  151.               set the locV of sprite picsprite to 45 + h
  152.             end if
  153.             set the locH of sprite captionsprite to captionloch
  154.           else
  155.             if gWorld = "mind" then
  156.               if piccastname = "96-3.6" then
  157.                 set the locH of sprite picsprite to 457
  158.                 set the locV of sprite picsprite to 284
  159.               else
  160.                 if piccastname = "96-3.6b" then
  161.                   set the locH of sprite picsprite to 451
  162.                   set the locV of sprite picsprite to 282
  163.                 else
  164.                   if (the width of cast piccast > the height of cast piccast) or (the width of cast piccast = the height of cast piccast) then
  165.                     set the locH of sprite picsprite to 256 + w
  166.                     set the locV of sprite picsprite to 96 + h
  167.                   else
  168.                     set caph to the height of cast "caption-pic"
  169.                     set the locV of sprite captionsprite to centerpoint - (caph / 2)
  170.                     set the locH of sprite picsprite to 348 + w
  171.                     set the locV of sprite picsprite to 96 + h
  172.                   end if
  173.                 end if
  174.               end if
  175.               set the locH of sprite captionsprite to captionloch
  176.             else
  177.               if gWorld = "body" then
  178.                 if the width of cast piccast > the height of cast piccast then
  179.                   set the locH of sprite picsprite to 298 + w
  180.                   set the locV of sprite picsprite to 68 + h
  181.                 else
  182.                   set the locH of sprite picsprite to 296 + w
  183.                   set the locV of sprite picsprite to 68 + h
  184.                 end if
  185.                 set the locH of sprite captionsprite to captionloch
  186.               end if
  187.             end if
  188.           end if
  189.         end if
  190.       end if
  191.     end if
  192.   else
  193.     set the locH of sprite captionsprite to captionloch
  194.   end if
  195.   updateStage()
  196.   if piccastname = "136-2.2" then
  197.     go("136-2.2")
  198.     set the visible of sprite 20 to 1
  199.   else
  200.     if piccastname = "136-2.3" then
  201.       go("136-2.3")
  202.       set the visible of sprite 20 to 1
  203.     else
  204.       if piccastname = "96-3.6" then
  205.         go("jung")
  206.       end if
  207.     end if
  208.   end if
  209. end
  210.  
  211. on GoSoundArticle
  212.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting, gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings, gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps, gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv, gMakerNum, gQTpath, gSoundpath, gNuggetTime, gNuggetDelay, gNameCastnum
  213.   set picsprite to 9
  214.   set cuttingsprite to 6
  215.   set titlesprite to 8
  216.   set papersprite to 11
  217.   set datesprite to 12
  218.   set captionsprite to 7
  219.   set forwardbutton to 20
  220.   set backbutton to 19
  221.   set headsprite to 10
  222.   set namesprite to 4
  223.   set headloch to gHeadlocH
  224.   set the locH of sprite headsprite to headloch
  225.   puppetSprite(forwardbutton, 0)
  226.   puppetSprite(backbutton, 0)
  227.   puppetSprite(papersprite, 0)
  228.   set the text of field "caption-qt" to " "
  229.   unpuppet("4,10")
  230.   set fname to gSoundpath & "S" & gMakerNum & ".AIF"
  231.   puppetSprite(16, 1)
  232.   set the locH of sprite 16 to 1000
  233.   sound playFile 1, fname
  234.   go("QT")
  235.   if (gWorld = "Senses") or (gWorld = "Design") then
  236.     set the locH of sprite namesprite to gNameLoch
  237.     set the locV of sprite namesprite to gNameLocv
  238.   end if
  239.   if (gWorld = "Senses") or (gWorld = "Design") then
  240.     puppetSprite(25, 1)
  241.     puppetSprite(26, 1)
  242.     puppetSprite(27, 1)
  243.     puppetSprite(28, 1)
  244.   end if
  245.   puppetSprite(captionsprite, 1)
  246.   set captionloch to the locH of sprite captionsprite
  247.   set the castNum of sprite captionsprite to the number of cast "caption-qt"
  248.   set the locH of sprite captionsprite to 1000
  249.   set the locH of sprite picsprite to 1000
  250.   updateStage()
  251.   set tmpcap to GetCaption()
  252.   set the text of field "caption-qt" to tmpcap
  253.   if gWorld <> "Senses" then
  254.     set the textHeight of field "caption-qt" to 18
  255.   else
  256.     set the textHeight of field "caption-qt" to 25
  257.   end if
  258.   if gWorld = "mind" then
  259.     set centerpoint to 200
  260.   else
  261.     set centerpoint to 280
  262.   end if
  263.   set caph to the height of cast "caption-qt"
  264.   if gWorld <> "Senses" then
  265.     set the locV of sprite captionsprite to centerpoint - (caph / 2)
  266.   end if
  267.   set the locH of sprite captionsprite to captionloch
  268. end
  269.  
  270. on GoAnimArticle
  271.   global gChapters, gTitles, gArticles, gDates, gCaptions, gCurCutting, gCurChap, gCurArticle, gName, mytext, gArticlePage, gFullCuttings, gFormattedText, gTextPages, gMaxLines, gCurIndex, gWorld, gSeenMaps, gPaperLoch, gMakerName, gHeadlocH, gNameLoch, gNameLocv, gQTAnimpath, gMakerNum, gQTpath, gSoundpath, gNuggetTime, gNuggetDelay, gNameCastnum
  272.   set picsprite to 9
  273.   set cuttingsprite to 6
  274.   set titlesprite to 8
  275.   set papersprite to 11
  276.   set datesprite to 12
  277.   set captionsprite to 7
  278.   set forwardbutton to 20
  279.   set backbutton to 19
  280.   set headsprite to 10
  281.   set namesprite to 4
  282.   set headloch to gHeadlocH
  283.   if not marker(gMakerNum & ".anim") then
  284.     exit
  285.   end if
  286.   set the locH of sprite headsprite to headloch
  287.   puppetSprite(forwardbutton, 0)
  288.   puppetSprite(backbutton, 0)
  289.   puppetSprite(papersprite, 0)
  290.   set the text of field "caption-qt" to " "
  291.   unpuppet("4,10")
  292.   go(gMakerNum & ".anim")
  293.   CleanMem()
  294.   if (gWorld = "Senses") or (gWorld = "Design") then
  295.     set the locH of sprite namesprite to gNameLoch
  296.     set the locV of sprite namesprite to gNameLocv
  297.   end if
  298.   if (gWorld = "Senses") or (gWorld = "Design") then
  299.     puppetSprite(25, 1)
  300.     puppetSprite(26, 1)
  301.     puppetSprite(27, 1)
  302.     puppetSprite(28, 1)
  303.   end if
  304.   puppetSprite(captionsprite, 1)
  305.   set captionloch to the locH of sprite captionsprite
  306.   set the castNum of sprite captionsprite to the number of cast "caption-qt"
  307.   set the locH of sprite captionsprite to 1000
  308.   set the locH of sprite picsprite to 1000
  309.   updateStage()
  310.   set tmpcap to GetCaption()
  311.   set the text of field "caption-qt" to tmpcap
  312.   if gWorld <> "Senses" then
  313.     set the textHeight of field "caption-qt" to 18
  314.   else
  315.     set the textHeight of field "caption-qt" to 25
  316.   end if
  317.   if gWorld = "Discover" then
  318.     set centerpoint to 250
  319.   else
  320.     set centerpoint to 280
  321.   end if
  322.   set caph to the height of cast "caption-qt"
  323.   if (gWorld <> "Senses") and (gWorld <> "Body") then
  324.     set the locV of sprite captionsprite to centerpoint - (caph / 2)
  325.   else
  326.     if gWorld = "Body" then
  327.       set the locV of sprite captionsprite to 112
  328.     end if
  329.   end if
  330.   set the locH of sprite captionsprite to captionloch
  331.   set the movieRate of sprite 3 to 1
  332.   puppetSprite(11, 1)
  333. end
  334.