home *** CD-ROM | disk | FTP | other *** search
/ Dictionnaire Le Robert Junior / DictionnaireLeRobertJunior-8-12-Ans-Win95Mac.bin / DEMO / Control.cst / 00001_Script_1 next >
Text File  |  1998-10-29  |  3KB  |  115 lines

  1. on startMovie 
  2.   cursor 200 
  3. end
  4.  
  5. on keyDown
  6.   global gbBoucle, gLastMovie, gbDemoSeule
  7.   if not( voidP(gLastMovie)) then
  8.     if gbBoucle AND (gbDemoSeule=FALSE) then
  9.       if the machineType=256 then
  10.         if (chartonum(the key)=113) or (the key = "q" or the key ="Q") then
  11.           quitteDemo()
  12.           abort
  13.         end if
  14.       else
  15.         if the optionDown then
  16.           if (chartonum(the key)=224) then
  17.             quitteDemo()
  18.             abort
  19.           end if
  20.         end if
  21.         if the controlDown then
  22.           if (chartonum(the key)=17) then
  23.             quitteDemo()
  24.             abort
  25.           end if
  26.         end if
  27.       end if
  28.     else
  29.       if the commandDown and ¼
  30.    (the key = "." or the key = "q" or the key ="Q") then
  31.         quitteDemo()
  32.         abort
  33.       end if
  34.       
  35.       -- ALT-F4 ou ECHAP
  36.       if (the keycode=53) then
  37.         quitteDemo()
  38.         abort
  39.       end if
  40.     end if
  41.   end if
  42. end
  43.  
  44. on mouseDown
  45.   global gbDemoSeule, gbBoucle
  46.   if gbBoucle AND (gbDemoSeule=FALSE) then
  47.     -- rien si on est dans une boucle
  48.   else
  49.     if the doubleClick then
  50.       quitteDemo()
  51.     end if  
  52.   end if
  53. end
  54.  
  55. on quitteDemo
  56.   global gLastMovie, gbDemoSeule, gLastFrame
  57.   if gbDemoSeule then
  58.     quit
  59.   else
  60.     sound stop 1
  61.     sound stop 2
  62.     sound stop 3
  63.     --    cursor -1
  64.     hGoMovie(gLastMovie, gLastFrame)
  65.   end if
  66. end
  67.  
  68. on FinDemo
  69.   global gListeFichierBoucle, gIndexFichierBoucle, gbBoucle
  70.   if gbBoucle then
  71.     set nb=count(gListeFichierBoucle)
  72.     if gIndexFichierBoucle<nb then
  73.       set gIndexFichierBoucle=gIndexFichierBoucle+1
  74.     else
  75.       set gIndexFichierBoucle=1
  76.     end if
  77.     LanceDemo(getAt(gListeFichierBoucle, gIndexFichierBoucle))
  78.   else
  79.     quitteDemo()
  80.   end if
  81. end
  82.  
  83. on LanceDemo pnomFichierDemo
  84.   global gPathCD, gItemPath, gbDemoSeule
  85.   sound stop 1
  86.   sound stop 2
  87.   sound stop 3
  88.   
  89.   if not(gbDemoSeule) then
  90.     hGoMovie(gPathCD&pnomFichierDemo&gItemPath&pnomFichierDemo)
  91.   else
  92.     hGoMovie(gPathCD&pnomFichierDemo)
  93.   end if
  94. end
  95.  
  96. ---------------------------------------------
  97. -- Nom du handler : hGoMovie
  98. -- R⌠le : Go Movie avec changement de curseur
  99. -- Parametres d'entree : 
  100. --pMovie : nom Animation
  101. --pFrame : nom Frame
  102. -- parametres de sorties :
  103. -- rΘvision :
  104.  
  105. on hGoMovie pMovie, pFrame
  106.   cursor 4
  107.   set the cursor of sprite (the currentSpriteNum)=4  
  108.   unloadMember
  109.   if the paramCount=1 then
  110.     go movie pMovie
  111.   else
  112.     go frame pFrame of movie pMovie
  113.   end if
  114.   cursor 0
  115. end hGoMovie