home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global songtimed,songframe,songh,songv,prev_vol
-
- checkpage
-
- repeat with i in [3,4]
- if rollover(i) then
- if the visible of sprite i = false then
- set the visible of sprite i = true
- if soundbusy(1)=false then puppetsound "markdwn.aif"
- end if
- else
- set the visible of sprite i = false
- end if
- end repeat
-
- if songtimed = false then
- if soundbusy(3) then
- go the frame
- else
- set prev_vol = abs(prev_vol) * -1
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- if marker(0) = label("sing3") then
- go "sing"
- end if -- else we advance to the next frame because we don't loop to this frame
- end if
- else -- here because of a timeout
- set stay = false
- if the mouseh = songh then
- if the mousev = songv then
- set stay = true
- end if
- end if
- if stay then
- if soundbusy(3) then
- go the frame
- else
- put "song done"
- set songtimed = false
- set the timeoutlapsed = 0
- set the visible of sprite 3 = true
- set the visible of sprite 4 = true
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- set prev_vol = abs(prev_vol)
- set the volume of sound 3 = prev_vol
- sound close 3
- go songframe
- end if
- else
- put "the mouse moved"
- puppetsound 0
- set songtimed = false
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- set prev_vol = abs(prev_vol)
- set the volume of sound 3 = prev_vol
- sound close 3
- go songframe
- end if
- end if
- end
-
- on mouseup
- global songtimed,songframe,prev_vol
-
- if songtimed = true then
- put "the mouse was clicked"
- set songtimed = false
- set the visible of sprite 3 = true
- set the visible of sprite 4 = true
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
-
- set prev_vol = abs(prev_vol)
- set the volume of sound 3 = prev_vol
- sound close 3
- go songframe
- else
- if the clickon = 4 then
- sound close 3
- set prev_vol = abs(prev_vol) * -1
- if marker(0) <> label("sing3") then
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- go marker(1)
- else
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- go "sing"
- end if
- end if
- end if
- end
-
- on keyup
- global songtimed,songframe,prev_vol
-
- if songtimed= true then
- put "a key was pressed"
- sound close 3
- set the visible of sprite 3 = true
- set the visible of sprite 4 = true
- set songtimed = false
- repeat with i in [1,3,4]
- puppetsprite i,false
- end repeat
- set the volume of sound 3 = abs(prev_vol)
- go songframe
- end if
- end