home *** CD-ROM | disk | FTP | other *** search
/ Diccionario Visual Trilingue / VISUAL.iso / SHARED.DIR / 10058_General Scripts.ls < prev    next >
Encoding:
Text File  |  1997-07-04  |  6.8 KB  |  242 lines

  1. global gCurrentLabel, gTextLanguage, gPictureOnly, gShowAll, gLstRectHS, gLstLabelButtonHS, gFBData, gPictData, gRedTagData, gBracketData, gRegionData, gZoomData, gCutData, gJumpData, gLinkData, glstlabels, gCurrAnimation, gLastPictLabel, gOrgLstRectHS, gTransitionSize, gIndexChange, gContenuChange, gAlertText, gLstAnimHS, gTransitionType, gCurrentMovieNumber, gCurrentScreen, gScreenStatus, gLstIllustScr, glstSpriteNumVignet, gSpriteNumRolledOver, glstVignet, gWorking, gVignetNum, gSndSprite, gStringRessources
  2.  
  3. on PlayLabelSound
  4.   if the key = " " then
  5.     if gSndSprite <> 0 then
  6.       if the castNum of sprite gSndSprite <> 0 then
  7.         if the castType of cast the castNum of sprite gSndSprite = #digitalVideo then
  8.           if the movieRate of sprite gSndSprite <> 0 then
  9.             return 
  10.           end if
  11.         end if
  12.       end if
  13.     end if
  14.     if getPos(gLstIllustScr, gScreenStatus) = 0 then
  15.       if gVignetNum <> 0 then
  16.         accessQTsound(getAt(getAt(glstVignet, gVignetNum), 5), gTextLanguage)
  17.       end if
  18.     else
  19.       if gPictureOnly then
  20.         return 
  21.       end if
  22.       set LabelPriority to 0
  23.       if getAt(gLstLabelButtonHS, 3) <> [] then
  24.         set LabelPriority to 3
  25.       else
  26.         if getAt(gLstLabelButtonHS, 2) <> [] then
  27.           set LabelPriority to 2
  28.         else
  29.           if getAt(gLstLabelButtonHS, 1) <> [] then
  30.             set LabelPriority to 1
  31.           end if
  32.         end if
  33.       end if
  34.       if LabelPriority <> 0 then
  35.         set LabelID to getAt(getAt(getAt(gLstLabelButtonHS, LabelPriority), 2), 1)
  36.         set Language to getAt(getAt(gLstLabelButtonHS, LabelPriority), 3)
  37.         accessQTsound(LabelID, Language, gCurrentMovieNumber, the name of cast gCurrentScreen)
  38.       end if
  39.     end if
  40.   end if
  41. end
  42.  
  43. on ChangeTextLanguage NewLanguage
  44.   set gTextLanguage to NewLanguage
  45.   set gIndexChange to 1
  46.   set gContenuChange to 1
  47.   DrawTitle(getAt(getAt(gFBData, 6), NewLanguage))
  48.   if gPictureOnly then
  49.     return 
  50.   end if
  51.   if gShowAll then
  52.     EraseAll()
  53.     DrawAll(0)
  54.     ShowAll()
  55.   else
  56.     if getAt(gLstLabelButtonHS, 1) <> [] then
  57.       DrawLabelAndArrow2(getAt(getAt(gLstLabelButtonHS, 1), 2), 41, 42)
  58.     end if
  59.     if getAt(gLstLabelButtonHS, 2) <> [] then
  60.       DrawLabelAndArrow2(getAt(getAt(gLstLabelButtonHS, 2), 2), 43, 44)
  61.     end if
  62.     if getAt(gLstLabelButtonHS, 3) <> [] then
  63.       drawOneFilet(gCurrentLabel, 0)
  64.       set gCurrentLabel to []
  65.       DrawLabelAndArrow2(getAt(getAt(gLstLabelButtonHS, 3), 2), 39, 40)
  66.     end if
  67.   end if
  68. end
  69.  
  70. on ShowAll
  71.   set gWorking to 1
  72.   if gPictureOnly then
  73.     set gPictureOnly to 0
  74.     DrawAll(0)
  75.   end if
  76.   if gCurrentLabel <> [] then
  77.     drawOneFilet(gCurrentLabel, 0)
  78.   end if
  79.   ResetActiveLabels()
  80.   set gLstLabelButtonHS to [[], [], []]
  81.   set gCurrentLabel to []
  82.   set gLastPictLabel to 0
  83.   set gLstRectHS to copyList(gOrgLstRectHS)
  84.   repeat with i = 1 to count(glstlabels)
  85.     setAt(getAt(glstlabels, i), 4, gTextLanguage)
  86.   end repeat
  87.   if (count(gFBData) > 0) and (gScreenStatus <> #ZOOM) then
  88.     DrawLabel2(getAt(gFBData, 4), gTextLanguage, 1)
  89.   end if
  90.   repeat with i = 1 to count(gPictData)
  91.     DrawLabel2(getAt(getAt(gPictData, i), 5), gTextLanguage, 1)
  92.   end repeat
  93.   repeat with i = 1 to count(gRedTagData)
  94.     set redDotTemp to getAt(gRedTagData, i)
  95.     if getAt(redDotTemp, 6) <> gCurrAnimation then
  96.       EraseRedTag(redDotTemp)
  97.       DrawLabel2(getAt(redDotTemp, 5), gTextLanguage, 1)
  98.     end if
  99.   end repeat
  100.   repeat with i = 1 to count(gBracketData)
  101.     DrawLabel2(getAt(getAt(gBracketData, i), 5), gTextLanguage, 1)
  102.   end repeat
  103.   repeat with i = 1 to count(gRegionData)
  104.     DrawLabel2(getAt(getAt(gRegionData, i), 5), gTextLanguage, 1)
  105.   end repeat
  106.   repeat with i = 1 to count(gZoomData)
  107.     DrawLabel2(getAt(getAt(gZoomData, i), 5), gTextLanguage, 1)
  108.   end repeat
  109.   repeat with i = 1 to count(gCutData)
  110.     DrawLabel2(getAt(getAt(gCutData, i), 4), gTextLanguage, 1)
  111.   end repeat
  112.   repeat with i = 1 to count(gJumpData)
  113.     DrawLabel2(getAt(getAt(gJumpData, i), 4), gTextLanguage, 1)
  114.   end repeat
  115.   repeat with i = 1 to count(gLinkData)
  116.     DrawLabel2(getAt(getAt(gLinkData, i), 4), gTextLanguage, 1)
  117.   end repeat
  118.   set the castNum of sprite 46 to 10001
  119.   set gShowAll to 1
  120.   set gPopUpButLoaded to 1
  121. end
  122.  
  123. on RefreshShowAll
  124.   set gWorking to 1
  125.   if gCurrAnimation = -1 then
  126.     repeat with i = 1 to count(glstlabels)
  127.       set label to getAt(glstlabels, i)
  128.       DrawLabel2(getAt(label, 3), getAt(label, 4), 0)
  129.     end repeat
  130.   else
  131.     repeat with i = 1 to count(glstlabels)
  132.       set label to getAt(glstlabels, i)
  133.       if getAt(getAt(glstlabels, i), 5) <> gCurrAnimation then
  134.         DrawLabel2(getAt(label, 3), getAt(label, 4), 0)
  135.       end if
  136.     end repeat
  137.   end if
  138.   set the castNum of sprite 46 to 10001
  139. end
  140.  
  141. on drawPaint
  142.   if gPictureOnly then
  143.     return 
  144.   end if
  145.   if (gScreenStatus = #ILLUSTRATION) or (gScreenStatus = #ZOOM) or (gScreenStatus = #REGION) then
  146.     if gShowAll then
  147.       DrawAll(0)
  148.       RefreshShowAll()
  149.     else
  150.       DrawAll(1)
  151.       if getAt(gLstLabelButtonHS, 3) <> [] then
  152.         set LabelData to getAt(getAt(gLstLabelButtonHS, 3), 2)
  153.         EraseRedTag(getAt(gRedTagData, getAt(LabelData, 7)))
  154.         drawOneFilet(LabelData, 1)
  155.       end if
  156.     end if
  157.   end if
  158. end
  159.  
  160. on PictureMode
  161.   if gPictureOnly then
  162.     return 
  163.   end if
  164.   set gShowAll to 0
  165.   ResetActiveLabels()
  166.   set gCurrentLabel to []
  167.   set gLstLabelButtonHS to [[], [], []]
  168.   EraseAll()
  169.   set gPictureOnly to 1
  170.   set gLastPictLabel to 0
  171.   repeat with i = 1 to count(gLstAnimHS)
  172.     drawAnim(getAt(gLstAnimHS, i))
  173.   end repeat
  174.   set the castNum of sprite 46 to 10001
  175. end
  176.  
  177. on TextMode
  178.   if not gPictureOnly then
  179.     return 
  180.   end if
  181.   DrawAll(1)
  182.   if gFBData <> [] then
  183.     DrawLabelAndArrow2(getAt(gFBData, 4), 41, 42)
  184.   end if
  185.   set gPictureOnly to 0
  186.   if gShowAll then
  187.     ShowAll()
  188.   end if
  189. end
  190.  
  191. on gotoframe FrameNo, transition
  192.   puppetManager(0)
  193.   if transition then
  194.     puppetTransition(gTransitionType, 0, gTransitionSize)
  195.   end if
  196.   go(FrameNo)
  197.   watchCursor()
  198.   puppetTransition(0)
  199.   puppetManager(1)
  200. end
  201.  
  202. on GrabStage erase
  203.   if erase then
  204.     EraseAll()
  205.   end if
  206.   puppetTransition(9, 0, 100)
  207.   repeat with i = 1 to 48
  208.     set the trails of sprite i to 1
  209.   end repeat
  210.   updateStage()
  211.   repeat with i = 1 to 48
  212.     set the castNum of sprite i to 10001
  213.     set the trails of sprite i to 0
  214.   end repeat
  215.   updateStage()
  216. end
  217.  
  218. on flashButton SpriteNo
  219.   set TempNum to the castNum of sprite SpriteNo + 1
  220.   set the castNum of sprite SpriteNo to TempNum
  221.   updateStage()
  222.   startTimer()
  223.   repeat while the timer < 10
  224.     nothing()
  225.   end repeat
  226.   set TempNum to the castNum of sprite SpriteNo - 1
  227.   set the castNum of sprite SpriteNo to TempNum
  228.   updateStage()
  229. end
  230.  
  231. on copyList OrginalList
  232.   set NewList to []
  233.   repeat with i = 1 to count(OrginalList)
  234.     add(NewList, getAt(OrginalList, i))
  235.   end repeat
  236.   return NewList
  237. end
  238.  
  239. on getString StringType, StringLanguage
  240.   return getAt(getProp(gStringRessources, StringType), StringLanguage)
  241. end
  242.