home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- go(the frame)
- end
-
- on enterFrame
- global gYes, gSong, gPath, gYesQuit, gNet, gClickNet, gNetDati, gClickDati, gLine, checkStream, gSource, netLibraryList, gNetLibrary
- if the visible of window "HelpM" then
- moveHelp()
- else
- set the volume of member "preview" to 255 * integer(field "fieldMasterVol") / 128
- if gYes then
- set gYes to 0
- stop(member "preview")
- set tList to DirectoryToList(gPath & "Song\" & gSong & "\")
- repeat with i = 1 to count(tList)
- set file to getAt(tList, i)
- IKChangeAttrib(gPath & "Song\" & gSong & "\" & file)
- DeleteFile(gPath & "Song\" & gSong & "\" & file)
- end repeat
- DeleteDirectory(gPath & "Song\" & gSong)
- repeat with i = 1 to the lineCount of member "fieldElencoSongHD"
- if line i of field "fieldElencoSongHD" = gSong then
- delete line i of field "fieldElencoSongHD"
- exit repeat
- end if
- end repeat
- put EMPTY into field "fieldDescription"
- put EMPTY into field "fieldBpm"
- sound stop 1
- end if
- if gYesQuit then
- IKSynthStop()
- IKStop()
- closeXLib("Xtras\IKTrack.X32")
- closeXLib("Xtras\Fileio.X32")
- closeXLib("Xtras\FileUtil.X32")
- put EMPTY into field "fieldMasterVol"
- put EMPTY into field "fieldBpm"
- put EMPTY into field "fieldDescription"
- go("exit")
- end if
- if gClickNet then
- set the visible of sprite 53 to 1
- if netTextResult(gNet) <> EMPTY then
- set the visible of sprite 53 to 0
- set gClickNet to 0
- put EMPTY into field "fieldElencoSongNET"
- set netLibraryList to []
- repeat with i = 1 to the number of lines in netTextResult(gNet)
- set temp to line i of netTextResult(gNet)
- append(netLibraryList, word 1 of temp)
- delete word 1 of temp
- put temp & RETURN after field "fieldElencoSongNET"
- end repeat
- delete char -30003 of field "fieldElencoSongNET"
- set the textFont of member "fieldElencoSongNET" to "IK10"
- set the foreColor of member "fieldElencoSongNET" to 0
- set the textSize of member "fieldElencoSongNET" to 13
- set the scrollTop of member "fieldElencoSongNET" to 0
- end if
- end if
- if gClickDati then
- set the visible of sprite 53 to 1
- if netTextResult(gNetDati) <> EMPTY then
- set gClickDati to 0
- set dati to netTextResult(gNetDati)
- netAbort()
- repeat with i = 1 to the number of lines in dati
- set linea to line i of dati
- case word 1 of linea of
- "SONGLIBRARY:":
- delete word 1 of linea
- put linea into field "fieldLibrary"
- set the textFont of member "fieldLibrary" to "Arial"
- set the textSize of member "fieldLibrary" to 10
- set the foreColor of member "fieldLibrary" to 0
- "SONGTITLE:":
- delete word 1 of linea
- put linea into field "fieldTitle"
- set the textFont of member "fieldTitle" to "Arial"
- set the textSize of member "fieldTitle" to 10
- set the foreColor of member "fieldTitle" to 0
- "SONGDESCRIPTION:":
- delete word 1 of linea
- put linea into field "fieldDescription"
- set the textFont of member "fieldDescription" to "Arial"
- set the textSize of member "fieldDescription" to 10
- set the foreColor of member "fieldDescription" to 0
- "SONGBPM:":
- delete word 1 of linea
- put linea into field "fieldBpm"
- set the textFont of member "fieldBpm" to "Arial"
- set the textSize of member "fieldBpm" to 10
- set the foreColor of member "fieldBpm" to 0
- "COPYRIGHT:":
- delete word 1 of linea
- put linea into field "fieldCopy"
- set the textFont of member "fieldCopy" to "Arial"
- set the textSize of member "fieldCopy" to 10
- set the foreColor of member "fieldCopy" to 0
- "LICENSE:":
- delete word 1 of linea
- put linea into field "fieldLic"
- set the textFont of member "fieldLic" to "Arial"
- set the textSize of member "fieldLic" to 10
- set the foreColor of member "fieldLic" to 0
- end case
- end repeat
- set pos to gLine
- set the fileName of member "library" to the moviePath & "library.gif"
- set source to "http://www.groovemaker.com/songpreview/" & getAt(netLibraryList, pos) & ".gif"
- if FileExists(gPath & "Media\" & getAt(netLibraryList, pos) & ".gif") <> 0 then
- downloadNetThing(source, gPath & "Media\" & getAt(netLibraryList, pos) & ".gif")
- set gSource to gPath & "Media\" & getAt(netLibraryList, pos)
- set checkStream to 1
- else
- set the fileName of member "library" to gPath & "Media\" & getAt(netLibraryList, pos) & ".gif"
- set the memberNum of sprite 51 to the number of member "library"
- set the visible of sprite 50 to 1
- set the visible of sprite 51 to 1
- updateStage()
- if FileExists(gPath & "Media\" & getAt(netLibraryList, pos) & ".swa") = 0 then
- set the visible of sprite 53 to 0
- end if
- end if
- set source to "http://www.groovemaker.com/songpreview/" & getAt(netLibraryList, pos) & ".swa"
- if FileExists(gPath & "Media\" & getAt(netLibraryList, pos) & ".swa") <> 0 then
- downloadNetThing(source, gPath & "Media\" & getAt(netLibraryList, pos) & ".swa")
- set gSource to gPath & "Media\" & getAt(netLibraryList, pos)
- set checkStream to 1
- else
- set the url of member "preview" to gPath & "Media\" & getAt(netLibraryList, pos) & ".swa"
- play frame member "preview"
- if FileExists(gPath & "Media\" & getAt(netLibraryList, pos) & ".gif") = 0 then
- set the visible of sprite 53 to 0
- end if
- play frame member "preview"
- end if
- end if
- end if
- end if
- if checkStream then
- checkSwa()
- end if
- end
-