home *** CD-ROM | disk | FTP | other *** search
/ Sound, Music & MIDI Collection 2 / SMMVOL2.bin / DEMO / PRG / CIRCLES.ZIP / CI_MAIN.DIX / 00018_BRW2.ls < prev    next >
Encoding:
Text File  |  1995-05-01  |  9.6 KB  |  321 lines

  1. on selwin texte, textg
  2.   global fcommand, spritecount, up_lang
  3.   sprite_save(47)
  4.   sprite_save(48)
  5.   set the castNum of sprite 47 to the number of cast "WINSEL"
  6.   set the ink of sprite 47 to 0
  7.   sprite_show(47, 235, 250)
  8.   if up_lang = 2 then
  9.     put textg into field "MSGTXT"
  10.   else
  11.     put texte into field "MSGTXT"
  12.   end if
  13.   setfont("MSGTXT")
  14.   set the castNum of sprite 48 to the number of cast "MSGTXT"
  15.   set the ink of sprite 48 to 1
  16.   set the editableText of sprite 48 to 0
  17.   sprite_show(48, 110, 215)
  18.   updateStage()
  19.   repeat while 1
  20.     if the mouseDown then
  21.       set x to the mouseH
  22.       set y to the mouseV
  23.       set mcast to the mouseCast
  24.       set mb to EMPTY
  25.       set debug to 0
  26.       if (x >= 158) and (x <= 232) and (y <= 292) and (y >= 270) then
  27.         set answer to 0
  28.         exit repeat
  29.       end if
  30.       if (x >= 269) and (x <= 343) and (y <= 293) and (y >= 270) then
  31.         set answer to 1
  32.         exit repeat
  33.       end if
  34.     end if
  35.   end repeat
  36.   repeat while 1
  37.     if not (the mouseDown) then
  38.       exit repeat
  39.     end if
  40.   end repeat
  41.   updateStage()
  42.   sprite_blank(47)
  43.   sprite_blank(48)
  44.   updateStage()
  45.   sprite_rest()
  46.   sprite_rest()
  47.   return answer
  48. end
  49.  
  50. on selfname what
  51.   global ecommand, spritecount, framecnt, enterFrame, backwhat, getmix_inst, up_save, sel_name, sel_extension, acwin, up_csave, up_lang, idsw
  52.   if length(what) = 0 then
  53.     set what to backwhat
  54.   end if
  55.   but_reflash()
  56.   if idsw then
  57.     if the machineType = 256 then
  58.       alertrd("IDSW not in english", "In dem folgenden Fenster bitte" & " einen " & RETURN & "kompletten Pfad- und Dateinamen ohne Extension" & " eingeben." & RETURN & "Beispiel: C:\TEST\CIRCLE")
  59.     else
  60.       alertrd("IDSW not in english", "In dem folgenden Fenster bitte" & " einen " & RETURN & "kompletten Ordner- und Dateinamen" & " eingeben." & RETURN & "Beispiel: MacIntosh HD:TEST:CIRCLE")
  61.     end if
  62.   end if
  63.   sprite_save(45)
  64.   sprite_save(46)
  65.   sprite_save(47)
  66.   set getmix_inst to 1
  67.   set sel_name to EMPTY
  68.   if idsw then
  69.     set the castNum of sprite 45 to the number of cast "SELFNAID"
  70.   else
  71.     set the castNum of sprite 45 to the number of cast "SELFNA"
  72.   end if
  73.   puppetSprite(45, 1)
  74.   set the ink of sprite 45 to 0
  75.   set the visible of sprite 45 to 1
  76.   sprite_show(45, 235, 250)
  77.   puppetTransition(9, 1, 5)
  78.   if what = "CIRCLE" then
  79.     set up_s to up_csave
  80.   else
  81.     set up_s to up_save
  82.   end if
  83.   if up_lang = 1 then
  84.     put "Enter a " & what & " Filename." & RETURN into field "MSGTXT"
  85.   else
  86.     if idsw then
  87.       if the machineType = 256 then
  88.         put "Einen Drive-, Pfad- und Dateinamen eingeben." & RETURN into field "MSGTXT"
  89.       else
  90.         put "Einen Drive-, Ordner- und Dateinamen eingeben." & RETURN into field "MSGTXT"
  91.       end if
  92.     else
  93.       put "Einen " & what & " Dateinamen eingeben." & RETURN into field "MSGTXT"
  94.     end if
  95.   end if
  96.   setfont("MSGTXT")
  97.   set the castNum of sprite 46 to the number of cast "MSGTXT"
  98.   puppetSprite(46, 1)
  99.   set the ink of sprite 46 to 1
  100.   sprite_show(46, 110, 210)
  101.   set the textAlign of field "TXEDIT" to "center"
  102.   set the textStyle of field "TXEDIT" to "bold"
  103.   setfont("TXEDIT")
  104.   put EMPTY into field "TXEDIT"
  105.   set the castNum of sprite 47 to the number of cast "TXEDIT"
  106.   puppetSprite(47, 1)
  107.   set the ink of sprite 47 to 0
  108.   set the editableText of sprite 47 to 1
  109.   sprite_show(47, 150, 245)
  110.   if what = "CIRCLE" then
  111.     set sel_extension to ".CIR"
  112.   end if
  113.   if what = "SOUND" then
  114.     if the machineType = 256 then
  115.       set sel_extension to ".WAV"
  116.     else
  117.       set sel_extension to ".AIF"
  118.     end if
  119.   end if
  120.   set backwhat to what
  121.   set ecommand to "SFdo"
  122.   set acwin to "SFNA"
  123. end
  124.  
  125. on selfname_do
  126.   global scommand, ecommand, ltl_len, ltl_time, ltl_scast, ltl_mix, getmix_inst, sel_extension, sel_name, up_lang
  127.   if the mouseDown then
  128.     set x to the mouseH
  129.     set y to the mouseV
  130.     set mcast to the mouseCast
  131.     set mb to EMPTY
  132.     set debug to 0
  133.     if (x >= 294) and (x <= 367) and (y <= 293) and (y >= 270) then
  134.       but_flash("CANCEL", 331, 282)
  135.       set ecommand to "SFcl"
  136.       set scommand to EMPTY
  137.     end if
  138.     if (x >= 200) and (x <= 270) and (y <= 293) and (y >= 270) then
  139.       but_flash("OK", 236, 282)
  140.       set vchkfn to the text of field "TXEDIT"
  141.       if chkfn(vchkfn) then
  142.         set vchkfn to the text of field "TXEDIT" & sel_extension
  143.         if chkfexist(vchkfn) then
  144.           set sel_name to the text of field "TXEDIT" & sel_extension
  145.           set ecommand to "SFcl"
  146.         else
  147.           set yesno to selwin("File already exists !" & RETURN & "Overwrite.", "Die Datei ist schon vorhanden !" & RETURN & "Ueberschreiben ?")
  148.           if up_lang = 1 then
  149.             put "Edit a Filename without Extension." into field "MSGTXT"
  150.           else
  151.             put "Einen Dateinamen ohne Extension eingeben." into field "MSGTXT"
  152.           end if
  153.           if yesno then
  154.             set sel_name to the text of field "TXEDIT" & sel_extension
  155.             set ecommand to "SFcl"
  156.           else
  157.             set the ink of sprite 47 to 0
  158.             set the editableText of sprite 47 to 1
  159.             but_reflash()
  160.           end if
  161.         end if
  162.       else
  163.         alertrd("Invalid filename !", "Ungueltiger Dateiname")
  164.         if up_lang = 1 then
  165.           put "Edit a Filename without Extension." into field "MSGTXT"
  166.         else
  167.           put "Einen Dateinamen ohne Extension eingeben." into field "MSGTXT"
  168.         end if
  169.         set the ink of sprite 47 to 0
  170.         set the editableText of sprite 47 to 1
  171.         but_reflash()
  172.       end if
  173.     end if
  174.     if (x >= 102) and (x <= 175) and (y <= 293) and (y >= 270) then
  175.       but_flash("PATH", 140, 282)
  176.       set ecommand to "SFpa"
  177.     end if
  178.   end if
  179. end
  180.  
  181. on selfname_pa
  182.   global ecommand, fl_search
  183.   selfname_cl()
  184.   put "selfname_pa fl_search>" & fl_search
  185.   if fl_search = "CIRCLE" then
  186.     set ecommand to "SFoc"
  187.     fsel("PATHC")
  188.   else
  189.     set ecommand to "SFop"
  190.     fsel("PATH")
  191.   end if
  192. end
  193.  
  194. on selfname_cl
  195.   global spritecount, acwin
  196.   but_reflash()
  197.   set the editableText of sprite 47 to 0
  198.   puppetTransition(10, 1, 5)
  199.   sprite_blank(45)
  200.   sprite_blank(46)
  201.   sprite_blank(47)
  202.   sprite_rest()
  203.   sprite_rest()
  204.   sprite_rest()
  205.   updateStage()
  206.   set acwin to "MAIN"
  207. end
  208.  
  209. on sndwin texte, textg
  210.   global ecommand, spritecount, framecnt, enterFrame, backwhat, getmix_inst, up_save, sel_name, sel_extension, acwin, up_csave, up_lang
  211.   sprite_save(45)
  212.   sprite_save(46)
  213.   sprite_save(47)
  214.   set the castNum of sprite 45 to the number of cast "WINSND"
  215.   puppetSprite(45, 1)
  216.   set the ink of sprite 45 to 0
  217.   set the visible of sprite 45 to 1
  218.   sprite_show(45, 235, 250)
  219.   puppetTransition(9, 1, 5)
  220.   if up_lang = 1 then
  221.     put texte into field "MSGTXT"
  222.   else
  223.     put textg into field "MSGTXT"
  224.   end if
  225.   setfont("MSGTXT")
  226.   set the castNum of sprite 46 to the number of cast "MSGTXT"
  227.   puppetSprite(46, 1)
  228.   set the ink of sprite 46 to 1
  229.   sprite_show(46, 110, 210)
  230.   updateStage()
  231.   repeat while 1
  232.     if the mouseDown then
  233.       set x to the mouseH
  234.       set y to the mouseV
  235.       set mcast to the mouseCast
  236.       set mb to EMPTY
  237.       set debug to 0
  238.       if (x >= 294) and (x <= 367) and (y <= 293) and (y >= 270) then
  239.         but_flash("YES", 331, 282)
  240.         set sndwin_ret to 1
  241.         exit repeat
  242.       end if
  243.       if (x >= 200) and (x <= 270) and (y <= 293) and (y >= 270) then
  244.         but_flash("NO", 236, 282)
  245.         set sndwin_ret to 2
  246.         exit repeat
  247.       end if
  248.       if (x >= 102) and (x <= 175) and (y <= 293) and (y >= 270) then
  249.         but_flash("CANCEL", 140, 282)
  250.         set sndwin_ret to 0
  251.         exit repeat
  252.       end if
  253.     end if
  254.   end repeat
  255.   but_reflash()
  256.   set the editableText of sprite 47 to 0
  257.   puppetTransition(10, 1, 5)
  258.   sprite_blank(45)
  259.   sprite_blank(46)
  260.   sprite_blank(47)
  261.   sprite_rest()
  262.   sprite_rest()
  263.   sprite_rest()
  264.   updateStage()
  265.   set acwin to "MAIN"
  266.   put "sndwin_ret>" & sndwin_ret
  267.   return sndwin_ret
  268. end
  269.  
  270. on selfname_do_id
  271.   global scommand, ecommand, ltl_len, ltl_time, ltl_scast, ltl_mix, getmix_inst, sel_extension, sel_name, up_lang
  272.   if the mouseDown then
  273.     set x to the mouseH
  274.     set y to the mouseV
  275.     set mcast to the mouseCast
  276.     set mb to EMPTY
  277.     set debug to 0
  278.     if (x >= 243) and (x <= 317) and (y <= 293) and (y >= 270) then
  279.       but_flash("CANCEL", 281, 282)
  280.       set ecommand to "SFcl"
  281.       set scommand to EMPTY
  282.     end if
  283.     if (x >= 147) and (x <= 222) and (y <= 293) and (y >= 270) then
  284.       but_flash("OK", 186, 282)
  285.       set vchkfn to the text of field "TXEDIT"
  286.       if 1 then
  287.         set vchkfn to the text of field "TXEDIT" & sel_extension
  288.         if chkfexist(vchkfn) then
  289.           set sel_name to the text of field "TXEDIT" & sel_extension
  290.           set ecommand to "SFcl"
  291.         else
  292.           set yesno to selwin("File already exists !" & RETURN & "Overwrite.", "Die Datei ist schon vorhanden !" & RETURN & "Ueberschreiben ?")
  293.           if up_lang = 1 then
  294.             put "Edit a Filename without Extension." into field "MSGTXT"
  295.           else
  296.             put "Einen Dateinamen ohne Extension eingeben." into field "MSGTXT"
  297.           end if
  298.           if yesno then
  299.             set sel_name to the text of field "TXEDIT" & sel_extension
  300.             set ecommand to "SFcl"
  301.           else
  302.             set the ink of sprite 47 to 0
  303.             set the editableText of sprite 47 to 1
  304.             but_reflash()
  305.           end if
  306.         end if
  307.       else
  308.         alertrd("Invalid filename !", "Ungueltiger Dateiname")
  309.         if up_lang = 1 then
  310.           put "Edit a Filename without Extension." into field "MSGTXT"
  311.         else
  312.           put "Einen Dateinamen ohne Extension eingeben." into field "MSGTXT"
  313.         end if
  314.         set the ink of sprite 47 to 0
  315.         set the editableText of sprite 47 to 1
  316.         but_reflash()
  317.       end if
  318.     end if
  319.   end if
  320. end
  321.