home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 April / Macworld (1999-04).dmg / Serious Software / GrooveMaker demo / GrooveMaker Demo / Media / MenuSong.dxr / 00025.ls < prev    next >
Encoding:
Text File  |  1998-07-27  |  3.0 KB  |  80 lines

  1. on mouseEnter
  2.   if the visible of window "Help" then
  3.     tell window "help"
  4.       go("menuSong7")
  5.     end tell
  6.   end if
  7. end
  8.  
  9. on mouseLeave
  10.   if the visible of window "Help" then
  11.     tell window "help"
  12.       go("start")
  13.     end tell
  14.   end if
  15. end
  16.  
  17. on mouseUp
  18.   global gSong, gClick, gPath, gInfo
  19.   if not (the visible of window "Help") then
  20.     if (line the mouseLine of field "fieldElencoSongHD" <> EMPTY) and (the number of words in line the mouseLine of field "fieldElencoSongHD" = 1) then
  21.       set linea to the mouseLine
  22.       set the foreColor of member "fieldElencoSongHD" to 0
  23.       set the foreColor of line linea of field "fieldElencoSongHD" to 14
  24.       set gClick to EMPTY
  25.       if gSong <> EMPTY then
  26.         stop(member "preview")
  27.       end if
  28.       set song to line linea of field "fieldElencoSongHD"
  29.       set fileTxt to ":info.gms"
  30.       set temp to IKCryptOpen(gPath & "song:song22:" & song & fileTxt)
  31.       set gInfo to EMPTY
  32.       set stringTemp to IKCryptGets(temp)
  33.       repeat while stringTemp <> "**********"
  34.         set gInfo to gInfo & stringTemp & RETURN
  35.         set stringTemp to IKCryptGets(temp)
  36.       end repeat
  37.       IKCryptClose(temp)
  38.       delete char -30003 of gInfo
  39.       delete char -30003 of gInfo
  40.       set serial to chars(the last line in gInfo, 3, length(the last line in gInfo))
  41.       if serial = "000000" then
  42.         set gSong to song
  43.         delete char -30003 of gInfo
  44.         set primaLinea to chars(line the number of lines in gInfo - 1 of gInfo, 3, length(line the number of lines in gInfo - 1 of gInfo))
  45.         if the last word in primaLinea = "Demo" then
  46.           set secondaLinea to chars(the last line in gInfo, 3, length(the last line in gInfo))
  47.           put primaLinea & RETURN & secondaLinea into field "fieldDescription"
  48.           set the textFont of member "fieldDescription" to "Helvetica"
  49.           set the textSize of member "fieldDescription" to 10
  50.           set the foreColor of member "fieldDescription" to 0
  51.           put chars(line the number of lines in gInfo - 4 of gInfo, 3, length(line the number of lines in gInfo - 4 of gInfo)) into field "fieldBpm"
  52.           set the textFont of member "fieldBpm" to "GMfont"
  53.           set the foreColor of member "fieldBpm" to 54
  54.           set the volume of member "preview" to 255 * integer(field "fieldMasterVol") / 128
  55.           set the url of member "preview" to gPath & "song:song22:" & gSong & ":preview.swa"
  56.           play frame member "preview"
  57.         else
  58.           set the foreColor of member "fieldElencoSongHD" to 0
  59.           put EMPTY into field "fieldDescription"
  60.           put EMPTY into field "fieldBpm"
  61.           openWin("Message")
  62.           tell window "Message"
  63.             go("17")
  64.           end tell
  65.           set gSong to EMPTY
  66.         end if
  67.       else
  68.         set the foreColor of member "fieldElencoSongHD" to 0
  69.         put EMPTY into field "fieldDescription"
  70.         put EMPTY into field "fieldBpm"
  71.         openWin("Message")
  72.         tell window "Message"
  73.           go("17")
  74.         end tell
  75.         set gSong to EMPTY
  76.       end if
  77.     end if
  78.   end if
  79. end
  80.