home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- global CrayonLocation, gNumeroMod, gFiltre, Consigne
- set Consigne to 1
- set CrayonLocation to point(the mouseH, the mouseV)
- set gFiltre to 0
- InitMain()
- repeat with i = 44 to 47
- Cmain(i, 2)
- end repeat
- set the timeoutLength to 20 * 60
- end
-
- on timeout
- global CrayonLocation
- if CrayonLocation = point(the mouseH, the mouseV) then
- set the blend of sprite 48 to 0
- dorelance(41)
- set the blend of sprite 48 to 100
- else
- set CrayonLocation to point(the mouseH, the mouseV)
- end if
- end
-
- on TireAuHasard
- global Tableau, gHasard
- set Hasard to 1
- set Combien to 5
- set Tableau to []
- repeat with i = 1 to Combien
- add(Tableau, i)
- end repeat
- if gHasard then
- repeat with i = 1 to Combien
- set rangHasard to random(Combien)
- set tempP1 to getAt(Tableau, rangHasard)
- set tempP2 to getAt(Tableau, i)
- setAt(Tableau, i, tempP1)
- setAt(Tableau, rangHasard, tempP2)
- end repeat
- end if
- end
-
- on Pinter Sprite1, Sprite2, ToleranceH, ToleranceV
- set SPH1 to the locH of sprite Sprite1
- set SPH2 to the locH of sprite Sprite2
- set SPV1 to the locV of sprite Sprite1
- set SPV2 to the locV of sprite Sprite2
- if SPH1 > SPH2 then
- set DifH to SPH1 - SPH2
- else
- set DifH to SPH2 - SPH1
- end if
- if SPV1 > SPV2 then
- set DifV to SPV1 - SPV2
- else
- set DifV to SPV2 - SPV1
- end if
- if (DifH <= ToleranceH) and (DifV <= ToleranceV) then
- set OK to 1
- else
- set OK to 0
- end if
- return OK
- end
-
- on gereTable
- global lastXPos, lastYPos, rowNumber, columnNumber
- set pasVertical to 29
- set orgVertical to 63 + 29
- set myMouseV to the mouseV
- set rowNumber to integer((myMouseV - orgVertical) / pasVertical)
- if rowNumber < 0 then
- set rowNumber to 0
- end if
- if rowNumber > 9 then
- set rowNumber to 9
- end if
- if rowNumber = 0 then
- set the memberNum of sprite 31 to 40
- end if
- if rowNumber = 1 then
- set the memberNum of sprite 31 to 41
- end if
- if rowNumber = 2 then
- set the memberNum of sprite 31 to 42
- end if
- if rowNumber = 3 then
- set the memberNum of sprite 31 to 43
- end if
- if rowNumber = 4 then
- set the memberNum of sprite 31 to 44
- end if
- if rowNumber = 5 then
- set the memberNum of sprite 31 to 45
- end if
- if rowNumber = 6 then
- set the memberNum of sprite 31 to 46
- end if
- if rowNumber = 7 then
- set the memberNum of sprite 31 to 47
- end if
- if rowNumber = 8 then
- set the memberNum of sprite 31 to 48
- end if
- if rowNumber = 9 then
- set the memberNum of sprite 31 to 49
- end if
- if rowNumber = 10 then
- set the memberNum of sprite 31 to 50
- end if
- set the locV of sprite 33 to orgVertical + 16 + (rowNumber * pasVertical)
- set the locV of sprite 32 to orgVertical + 16 + (rowNumber * pasVertical)
- updateStage()
- set pasHorizontal to 29
- set orgHorizontal to 281 + 29
- set myMouseH to the mouseH
- set columnNumber to integer((myMouseH - orgHorizontal) / pasHorizontal)
- if columnNumber < 0 then
- set columnNumber to 0
- end if
- if columnNumber > 9 then
- set columnNumber to 9
- end if
- if columnNumber = 0 then
- set the memberNum of sprite 32 to 29
- end if
- if columnNumber = 1 then
- set the memberNum of sprite 32 to 30
- end if
- if columnNumber = 2 then
- set the memberNum of sprite 32 to 31
- end if
- if columnNumber = 3 then
- set the memberNum of sprite 32 to 32
- end if
- if columnNumber = 4 then
- set the memberNum of sprite 32 to 33
- end if
- if columnNumber = 5 then
- set the memberNum of sprite 32 to 34
- end if
- if columnNumber = 6 then
- set the memberNum of sprite 32 to 35
- end if
- if columnNumber = 7 then
- set the memberNum of sprite 32 to 36
- end if
- if columnNumber = 8 then
- set the memberNum of sprite 32 to 37
- end if
- if columnNumber = 9 then
- set the memberNum of sprite 32 to 38
- end if
- if columnNumber = 10 then
- set the memberNum of sprite 32 to 39
- end if
- set the locH of sprite 31 to orgHorizontal + 16 + (columnNumber * pasHorizontal)
- set the locH of sprite 33 to orgHorizontal + 16 + (columnNumber * pasHorizontal)
- if (lastXPos <> columnNumber) or (lastYPos <> rowNumber) then
- puppetSound("Click out")
- set lastXPos to columnNumber
- set lastYPos to rowNumber
- end if
- updateStage()
- end
-