home *** CD-ROM | disk | FTP | other *** search
- global gRunningMovie, gLstAnimPals, gLstAnimHS, gMoviePal, gShowAll, gCurrAnimation, gRedTagData, gPictureOnly, glstlabels, gCurrentLabel, gLstLabelButtonHS, gLstRectHS, gActiveHS, gPalSwapped, gAnimsButtons, gActualRate, gPictLocV, gGoldenRate, gCurrentScreen, gCurrentCut
-
- on AnimationEnterFrame i
- set AnimActionID to getAt(getAt(gLstRectHS, i), 3)
- if getAt(gRunningMovie, 1) <> #stop then
- if getAt(getAt(gLstAnimHS, getAt(gRunningMovie, 2)), 5) = #button then
- return
- end if
- end if
- if count(gLstAnimPals) = 0 then
- ProcessOnePalAnim(AnimActionID)
- else
- if getAt(gLstAnimPals, 1) = i then
- if count(gLstAnimPals) = 2 then
- HideSecondPalette()
- end if
- ProcessOnePalAnim(AnimActionID)
- else
- if getAt(gRunningMovie, 1) = #stop then
- HideFirstPalette()
- ShowFirstPalette(AnimActionID)
- ProcessOnePalAnim(AnimActionID)
- else
- ProcessTwoPalAnim(AnimActionID)
- end if
- end if
- end if
- set gActiveHS to []
- add(gActiveHS, getAt(getAt(gLstRectHS, i), 2))
- add(gActiveHS, getAt(getAt(gLstRectHS, i), 3))
- end
-
- on PrepAnimLabels
- if gPictureOnly then
- return
- end if
- if gShowAll then
- repeat with i = 1 to count(glstlabels)
- if getAt(getAt(glstlabels, i), 5) = gCurrAnimation then
- set TempData to getAt(glstlabels, i)
- set LabelData to getAt(TempData, 3)
- set Language to getAt(TempData, 4)
- if count(LabelData) > 0 then
- set castNum to getAt(getProp(glstlabels, getAt(LabelData, 1)), 1) + ((Language - 1) * 100)
- set PosX to getAt(LabelData, 2)
- set PosY to getAt(LabelData, 3)
- set Point1 to getAt(LabelData, 9)
- set Justification to getAt(LabelData, 4)
- if Justification = 0 then
- set P1 to point(PosX - (the width of cast castNum / 2), PosY)
- set P2 to point(PosX + (the width of cast castNum / 2), PosY - the height of cast castNum)
- else
- if Justification = 1 then
- set P1 to point(PosX - the width of cast castNum, PosY)
- set P2 to point(PosX + 15, PosY - the height of cast castNum)
- set Point4 to point(getAt(Point1, 1) - the width of cast castNum, getAt(Point1, 2))
- else
- if Justification = 2 then
- set P1 to point(PosX + the width of cast castNum, PosY)
- set P2 to point(PosX - 15, PosY - the height of cast castNum)
- set Point4 to point(getAt(Point1, 1) + the width of cast castNum, getAt(Point1, 2))
- end if
- end if
- end if
- set the rect of sprite 45 to rect(P1, P2)
- updateStage()
- set the rect of sprite 45 to rect(getAt(LabelData, 10), getAt(LabelData, 11)) + rect(0, 0, 1, 1)
- updateStage()
- set the locH of sprite 45 to -1000
- updateStage()
- set the rect of sprite 45 to rect(getAt(LabelData, 10), Point4) + rect(0, 0, 1, 1)
- updateStage()
- set the locH of sprite 45 to -1000
- end if
- end if
- end repeat
- else
- if gCurrentLabel <> [] then
- if getAt(gCurrentLabel, 6) = #REDTAG then
- if getAt(getAt(gRedTagData, getAt(gCurrentLabel, 7)), 6) = gCurrAnimation then
- drawOneFilet(gCurrentLabel, 0)
- set the castNum of sprite 40 to 10001
- set the castNum of sprite 39 to 10001
- set gCurrentLabel to []
- setAt(gLstLabelButtonHS, 3, [])
- end if
- end if
- end if
- end if
- updateStage()
- end
-
- on setAnimLabels
- if gShowAll then
- set gCurrAnimation to -1
- ShowAll()
- else
- repeat with i = 1 to count(gRedTagData)
- set TempData to getAt(gRedTagData, i)
- if getAt(TempData, 6) = gCurrAnimation then
- DrawRedTag(TempData)
- end if
- end repeat
- set gCurrAnimation to -1
- end if
- end
-
- on CheckAnimPalettes
- if count(gLstAnimPals) <> 0 then
- if rollOver(35) and not gPalSwapped then
- if count(gLstAnimPals) = 2 then
- HideSecondPalette()
- end if
- ProcessOnePalAnim(getAt(gLstAnimPals, 1))
- return 0
- else
- if rollOver(36) and not gPalSwapped then
- if getAt(gRunningMovie, 1) = #stop then
- MakeSecondPalFirst()
- ProcessOnePalAnim(getAt(gLstAnimPals, 1))
- else
- ProcessTwoPalAnim(getAt(gLstAnimPals, 2))
- end if
- return 0
- else
- if count(gLstAnimPals) = 2 then
- if getAt(gRunningMovie, 1) = #stop then
- MakeSecondPalFirst()
- else
- HideSecondPalette()
- end if
- return 0
- else
- if count(gLstAnimPals) = 1 then
- if getAt(gRunningMovie, 1) = #stop then
- MovieStop(getAt(gRunningMovie, 2))
- HideFirstPalette()
- return 0
- end if
- end if
- end if
- end if
- end if
- end if
- return 1
- end
-
- on TurnButtonOn button, palette
- if palette = 1 then
- set the locH of sprite 37 to SpriteLeft(35) + 2 + (18 * (button - 1)) + (17 / 2.0)
- set the locV of sprite 37 to SpriteTop(35) + 1 + (17 / 2.0)
- else
- if palette = 2 then
- set the locH of sprite 37 to SpriteLeft(36) + 2 + (18 * (button - 1)) + (17 / 2.0)
- set the locV of sprite 37 to SpriteTop(36) + 1 + (17 / 2.0)
- else
- alert("Mauvaise palette passée en paramètre..." & palette)
- end if
- end if
- if button = 1 then
- set the castNum of sprite 37 to 10976
- else
- if button = 2 then
- if palette = 1 then
- if (gMoviePal = #PausePlus) or (gMoviePal = #PauseMoins) then
- set the castNum of sprite 37 to 10978
- else
- set the castNum of sprite 37 to 10977
- end if
- else
- set the castNum of sprite 37 to 10977
- end if
- else
- if button = 3 then
- set the castNum of sprite 37 to 10979
- else
- if button = 4 then
- set the castNum of sprite 37 to 10980
- else
- if button = 5 then
- if palette = 1 then
- if (gMoviePal = #PlayMoins) or (gMoviePal = #PauseMoins) then
- set the castNum of sprite 37 to 10982
- else
- set the castNum of sprite 37 to 10981
- end if
- else
- set the castNum of sprite 37 to 10982
- end if
- else
- if button = 0 then
- set the castNum of sprite 37 to 10001
- else
- alert("Aucune palette n'est sélectionné... Il manque une initialisation.")
- end if
- end if
- end if
- end if
- end if
- end if
- set the ink of sprite 37 to 8
- updateStage()
- end
-
- on SetgRunningMovie Mode, PosLst, State
- set gRunningMovie to []
- add(gRunningMovie, Mode)
- add(gRunningMovie, PosLst)
- add(gRunningMovie, State)
- if Mode = #stop then
- set gCurrAnimation to -1
- else
- set ActualHS to getAt(gLstAnimHS, PosLst)
- set gCurrAnimation to getAt(getAt(ActualHS, 6), 1)
- end if
- end
-
- on GetButtonNumber
- set Position to 0
- if count(gAnimsButtons) = 0 then
- return Position
- end if
- repeat with i = 1 to 5
- set Depart to point(the mouseH, the mouseV)
- set Arrivee to getAt(gAnimsButtons, i)
- if sqrt(power(getAt(Depart, 1) - getAt(Arrivee, 1), 2) + power(getAt(Depart, 2) - getAt(Arrivee, 2), 2)) < 7 then
- set Position to i
- exit repeat
- end if
- end repeat
- return Position
- end
-
- on GetAction button
- if button = 1 then
- return #stop
- else
- if button = 2 then
- return #play
- else
- if ((button = 3) and (gCurrentCut = 1)) or ((button = 4) and (gCurrentCut = 2)) then
- return #STEPBACK
- else
- if ((button = 4) and (gCurrentCut = 1)) or ((button = 3) and (gCurrentCut = 2)) then
- return #STEPFORWARD
- else
- if button = 5 then
- return #SPEED
- else
- if button = 0 then
- return #None
- else
- alert("Bouton invalide..." & button)
- end if
- end if
- end if
- end if
- end if
- end if
- end
-
- on Wait2
- startTimer()
- repeat while the timer < 60
- nothing()
- end repeat
- end
-
- on StepMovieMouseDown AnimHS, Direction
- set ActualHS to getAt(gLstAnimHS, AnimHS)
- set HsPos to getAt(ActualHS, 1)
- set MoviePos to getAt(ActualHS, 2)
- set CastNo to getAt(ActualHS, 3)
- set QtSpriteNo to getAt(getAt(ActualHS, 4), 2)
- set PictSpriteNo to getAt(getAt(ActualHS, 4), 1)
- set type to getAt(ActualHS, 5)
- if type = #TOGGLE then
- if getAt(gRunningMovie, 3) = #end then
- if the movieTime of sprite QtSpriteNo = the duration of cast CastNo then
- if Direction = #BACKWARD then
- set the movieRate of sprite QtSpriteNo to -(gGoldenRate * 2)
- else
- set the movieRate of sprite QtSpriteNo to 0
- end if
- else
- if the movieTime of sprite QtSpriteNo = 0 then
- if Direction = #FORWARD then
- set the movieRate of sprite QtSpriteNo to gGoldenRate * 2
- end if
- else
- if Direction = #FORWARD then
- set the movieRate of sprite QtSpriteNo to gGoldenRate * 2
- else
- set the movieRate of sprite QtSpriteNo to -(gGoldenRate * 2)
- end if
- end if
- end if
- else
- if the movieTime of sprite QtSpriteNo = the duration of cast CastNo then
- if Direction = #BACKWARD then
- set the movieRate of sprite QtSpriteNo to -(gGoldenRate * 2)
- else
- set the movieRate of sprite QtSpriteNo to 0
- end if
- else
- if the movieTime of sprite QtSpriteNo = 0 then
- if Direction = #FORWARD then
- set the movieRate of sprite QtSpriteNo to gGoldenRate * 2
- else
- set the movieRate of sprite QtSpriteNo to 0
- end if
- else
- if Direction = #FORWARD then
- set the movieRate of sprite QtSpriteNo to gGoldenRate * 2
- else
- set the movieRate of sprite QtSpriteNo to -(gGoldenRate * 2)
- end if
- end if
- end if
- end if
- else
- if Direction = #FORWARD then
- set the movieRate of sprite QtSpriteNo to gGoldenRate * 2
- else
- set the movieRate of sprite QtSpriteNo to -(gGoldenRate * 2)
- end if
- end if
- SetgRunningMovie(#step, AnimHS, getAt(gRunningMovie, 3))
- set gMovieMode to #SLOWSTEP
- end
-
- on CheckAnimStatus
- if getAt(gRunningMovie, 1) = #stop then
- return
- end if
- set MovieMode to getAt(gRunningMovie, 1)
- set HsID to getAt(gRunningMovie, 2)
- set State to getAt(gRunningMovie, 3)
- set ActualHS to getAt(gLstAnimHS, HsID)
- set QtSpriteNo to getAt(getAt(ActualHS, 4), 2)
- set PictSpriteNo to getAt(getAt(ActualHS, 4), 1)
- set CastNo to getAt(ActualHS, 3)
- set type to getAt(getAt(gLstAnimHS, HsID), 5)
- set ActualTime to the movieTime of sprite QtSpriteNo
- set MovieDuration to the duration of cast CastNo
- if type = #TOGGLE then
- if State = #start then
- if ActualTime = MovieDuration then
- SetgRunningMovie(#stop, HsID, #end)
- DoTransitionStop(HsID)
- MovieStop(HsID)
- SetgRunningMovie(#stop, HsID, #end)
- SetGoodAnimPal(#stop)
- end if
- else
- if ActualTime = 0 then
- SetgRunningMovie(#play, HsID, #start)
- DoTransitionStop(HsID)
- MovieStop(HsID)
- SetgRunningMovie(#stop, HsID, #start)
- SetGoodAnimPal(#stop)
- end if
- end if
- else
- if type = #OneShotEnd then
- if ActualTime = MovieDuration then
- DoTransitionStop(HsID)
- MovieStop(HsID)
- end if
- else
- if (type = #OneShotStart) or (type = #button) then
- if ActualTime = MovieDuration then
- DoTransitionStop(HsID)
- MovieStop(HsID)
- end if
- end if
- end if
- end if
- end
-