home *** CD-ROM | disk | FTP | other *** search
- on songprep
- global songtimed, songframe,songh,songv,puppetlist,lastsong
-
- if the moviename = "tdoc.dir" then
- if (the frame < label("sing")) or ¬
- (the frame > (label("sing3") + 1)) then
- set songtimed = true
- set songframe = marker(0)
- set songh = the mouseh
- set songv = the mousev
-
- repeat with i = 3 to 4
- set the visible of sprite i = false
- end repeat
-
- set puppetlist = []
- repeat with i = 1 to 47
- if the puppet of sprite i = true then
- add(puppetlist,i)
- set the visible of sprite i = false
- end if
- end repeat
-
- set songlist = ["sing","sing2","sing3"]
- set dest = lastsong
- repeat while dest = lastsong
- set dest = getat(songlist,random(3))
- end repeat
- set lastsong = dest
- go dest
- end if
- else
- set curloc = marker(0)
- if (curloc < label("sing")) or (curloc > label("help")) then
-
- set songtimed = true
- set songframe = marker(0)
- set songH = the mouseh
- set songv = the mousev
- set the visible of sprite 4 = false
- set the visible of sprite 3 = false
-
- set puppetlist = []
- repeat with i = 1 to 47
- if the puppet of sprite i = true then
- add(puppetlist,i)
- set the visible of sprite i = false
- end if
- end repeat
-
- set songlist = ["sing","sing2","sing3"]
- if voidp(lastsong) then set lastsong = getat(songlist,random(3))
-
- set dest = lastsong
- repeat while dest = lastsong
- set the randomseed = the timer
- set dest = getat(songlist,random(3))
- end repeat
-
- set lastsong = dest
- put "song chosen, old song replaced"
- go dest
- end if
- end if
- end