home *** CD-ROM | disk | FTP | other *** search
- global objpossui
-
- on startMovie
- global SPOptions, SPCursor, mv, mh, OptionSelected, ObjSelected, notshow, OptionsCood, Optcur, objetosel
- set SPOptions to 46
- set SPCursor to 48
- set OptionSelected to -1
- set ObjSelected to 0
- set objetosel to EMPTY
- set notshow to 1
- set mv to 0
- set mh to 0
- set OptionsCood to [-26, -62, 17, -19, -26, -18, 17, -1, -60, -18, -27, 40, 19, 5, 62, 48]
- set Optcur to ["OptionsCursor1", "OptionsCursor2", "OptionsCursor3", "OptionsCursor4"]
- puppetSprite(SPOptions, 1)
- puppetSprite(SPOptions + 1, 1)
- puppetSprite(SPCursor, 1)
- cursor(200)
- set the keyDownScript to "keydownhandle"
- set the exitLock to 1
- end
-
- on stopMovie
- global SPCursor
- set the visible of sprite SPCursor to 1
- cursor(-1)
- end
-
- on onstartmovie
- InitFaseVars()
- end
-
- on mouseover first, last
- global Obj1, Obj2, Obj3, Obj4, Obj5, Obj6, Obj7, Obj8, Obj9, Obj10, SPCursor, ObjSelected, objsBegin, OverObj, objetosel, isSettingVolume
- if isSettingVolume = 0 then
- set i to -1
- repeat with j = first to last
- if rollOver(j) then
- set i to j
- exit repeat
- end if
- SetCursorPos()
- end repeat
- if i <> -1 then
- set ObjSelected to i - objsBegin + 1
- set OverObj to "Obj" & ObjSelected
- set c to EMPTY
- if objetosel <> EMPTY then
- set c to objetosel & "Ativo"
- else
- do("set c = getaProp(" & OverObj & ",#cursor)")
- end if
- set the castNum of sprite SPCursor to cast c
- else
- if objetosel <> EMPTY then
- set the castNum of sprite SPCursor to cast objetosel
- else
- set the castNum of sprite SPCursor to cast "CursorNormal"
- end if
- set ObjSelected to 0
- end if
- end if
- end
-
- on ShowOptions MorK
- global SPOptions, OptionSelected, SPCursor, gMorK, ObjSelected, ObjNames, objsBegin, OverObj, notshow
- if notshow then
- set OptionSelected to 0
- set c to EMPTY
- set gMorK to MorK
- set spcv to the locV of sprite SPCursor
- set spch to the locH of sprite SPCursor
- set spcv to max(the height of cast the castNum of sprite SPOptions / 2, spcv)
- set spcv to min(480 - (the height of cast the castNum of sprite SPOptions / 2), spcv)
- set spch to max(the width of cast the castNum of sprite SPOptions / 2, spch)
- set spch to min(640 - (the width of cast the castNum of sprite SPOptions / 2), spch)
- if ObjSelected <> 0 then
- do("set c = getaprop(" & OverObj & ",#nome)")
- set c to c & "Cur"
- set the castNum of sprite (SPOptions + 1) to cast c
- else
- set the castNum of sprite (SPOptions + 1) to cast "NomeObj"
- end if
- set the castNum of sprite SPOptions to cast "OptionsCursor"
- set the castNum of sprite SPCursor to cast "CursorSelOptions"
- set the locV of sprite SPOptions to spcv
- set the locH of sprite SPOptions to spch
- set the locV of sprite (SPOptions + 1) to spcv + 64
- set the locH of sprite (SPOptions + 1) to spch + 1
- updateStage()
- set notshow to 0
- else
- pass()
- end if
- end
-
- on max x1, x2
- if x2 > x1 then
- return x2
- else
- return x1
- end if
- end
-
- on min x1, x2
- if x2 < x1 then
- return x2
- else
- return x1
- end if
- end
-
- on ChooseOption
- global gMorK
- SetCursorPos()
- OptionsSelection()
- if gMorK = 0 then
- if the stillDown = 0 then
- end if
- end if
- end
-
- on HideOptions
- global OptionSelected, SPOptions, SPCursor
- set the locV of sprite SPOptions to 600
- set the locH of sprite SPOptions to 700
- set the locV of sprite (SPOptions + 1) to 600
- set the locH of sprite (SPOptions + 1) to 700
- set the castNum of sprite SPCursor to cast "CursorNormal"
- updateStage()
- if OptionSelected <> 0 then
- ExecutaOption()
- end if
- set OptionSelected to -1
- end
-
- on OptionsSelection
- global SPOptions, SPCursor, OptionSelected, OptionsCood, Optcur
- set pv to the locV of sprite SPCursor - the locV of sprite SPOptions
- set ph to the locH of sprite SPCursor - the locH of sprite SPOptions
- set sel to 0
- repeat with i = 1 to 4
- if (ph >= getAt(OptionsCood, i + ((i - 1) * 3))) and (ph <= getAt(OptionsCood, i + 2 + ((i - 1) * 3))) and (pv >= getAt(OptionsCood, i + 1 + ((i - 1) * 3))) and (pv <= getAt(OptionsCood, i + 3 + ((i - 1) * 3))) then
- set sel to i
- exit repeat
- end if
- end repeat
- if sel <> 0 then
- set thecast to getAt(Optcur, sel)
- if the number of member thecast <> the castNum of sprite SPOptions then
- set the castNum of sprite SPOptions to cast thecast
- set OptionSelected to sel
- end if
- else
- set OC to the number of member "OptionsCursor"
- if the castNum of sprite SPOptions <> OC then
- set the castNum of sprite SPOptions to cast OC
- end if
- set OptionSelected to 0
- end if
- updateStage()
- end
-
- on ExecutaOption
- global Obj1, Obj2, Obj3, Obj4, Obj5, Obj6, Obj7, Obj8, Obj9, Obj10, OptionSelected, OverObj
- set actions to ["#olho", "#boca", "#mao", "#Livro"]
- set ac to EMPTY
- do("set ac = getaProp(" & OverObj & "," & getAt(actions, OptionSelected) & ")")
- do(ac)
- end
-
- on ExecutaObjAction
- global Obj1, Obj2, Obj3, Obj4, Obj5, Obj6, Obj7, Obj8, Obj9, Obj10, OptionSelected, OverObj, objetosel, ultimoobjsel
- set ac to EMPTY
- do("set ac = getaProp(" & OverObj & ",#obj)")
- set objtmp to objetosel & "Ativo"
- set ultimoobjsel to objetosel
- set objetosel to EMPTY
- if ac <> EMPTY then
- if ac = objtmp then
- do("set ac = getaProp(" & OverObj & ",#objact)")
- do(ac & " true")
- else
- do("set ac = getaProp(" & OverObj & ",#objact)")
- do(ac & " false")
- end if
- end if
- end
-
- on SetCursorPos
- global mv, mh, SPCursor, isSettingVolume
- if isSettingVolume = 0 then
- set the locV of sprite SPCursor to the mouseV
- set the locH of sprite SPCursor to the mouseH
- end if
- end
-
- on keydownhandle
- if (the key = "q") or (the key = "Q") then
- go("sair")
- end if
- if (the key = "s") or (the key = "S") then
- go("sair")
- end if
- end
-
- on mouseDownAction
- global OverObj, objetosel, notshow
- if notshow then
- if objetosel = EMPTY then
- set ac to EMPTY
- do("set ac = getaProp(" & OverObj & ",#cursor)")
- if ac = "CursorSobre" then
- ShowOptions(0)
- else
- do("set ac = getaProp(" & OverObj & ",#direc)")
- do(ac)
- end if
- else
- ExecutaObjAction()
- end if
- else
- pass()
- end if
- end
-
- on showText thecast
- put thecast
- play frame thecast
- end
-
- on SetCursor thecur
- cursor([cast thecur, cast (thecur & "Mask")])
- end
-