home *** CD-ROM | disk | FTP | other *** search
- global gVolume, gBTime, gATime, gProcessTime, gSoundTime, gSoundName, gRunChangePath, gCountPart, gPartMember, gPlay, gLevel, gLNum, gAllPath, gSqAnim, gVSprite, gPause, gVideoBig, gNaviPath, gNaviPath1, gNaviPath2, gNaviPath3, gNaviPath4, gNaviPath5, gNaviPath2_, gNaviPath3_, gNaviPath4_, gMenuPath, gMenuPath1, gMenuPath2, gMenuPath3, gMenuPath4, gMenuPath5, gMenuPath2_, gMenuPath3_, gMenuPath4_, maxProc, Section
-
- on Process PlayState, timing
- case PlayState of
- 0:
- if timing <> 1 then
- gProcessTime = the ticks
- case gLNum[1] of
- VOID:
- gPause = 300
- otherwise:
- gPause = 120
- end case
- else
- if (gProcessTime + gPause) < the ticks then
- gProcessTime = the ticks
- put "Koniec pauzy:" & gPause & " PATH:" & gLNum & " Frame:" & the frame
- AutoAction()
- result = 1
- else
- result = 0
- end if
- return result
- end if
- 1:
- if timing <> 1 then
- gCountPart = gCountPart + 1
- char1 = string(gLNum[1])
- char2 = string(gLNum[2])
- char3 = string(gLNum[3])
- gPartMember = char1 & char2 & char3 & "-" & gCountPart
- if member(gPartMember).number <> -1 then
- member("ShowMember").picture = member(gPartMember).picture
- else
- put "Chyba obrazok: " & gPartMember & " !!!"
- AutoAction()
- end if
- if gCountPart = 1 then
- gSoundName = string(gLNum[1] & gLNum[2] & gLNum[3])
- gSoundTime = member(gSoundName).duration
- if member(gSoundName).number <> -1 then
- AudioInt(gSoundName)
- end if
- put "Spustenie zvuku - Part:" & gSoundTime / 6000 & " SoundTime:" & gSoundTime & " PATH:" & gLNum & " Frame:" & the frame
- end if
- put "PROCESS 1 - zamena obrazku na: " & gPartMember & "(" & gCountPart & ")" & " Frame:" & the frame
- else
- maxProc = gSoundTime / 6000
- soundTime = sound(2).currentTime
- if (gSoundTime = soundTime) or not soundBusy(2) then
- gCountPart = 0
- put "Ukoncenie zvuku - Part:" & maxProc & " SoundTime:" & gSoundTime & " PATH:" & gLNum & " Frame:" & the frame
- AutoAction()
- result = 1
- else
- Section = gSoundTime / maxProc
- if soundTime >= (Section * gCountPart) then
- if soundTime <= gSoundTime then
- put "Koniec sekcie - skok na dalsi obrazok cislo:" & gCountPart + 1 & " Frame:" & the frame
- else
- gCountPart = 0
- put "Ukoncenie zvuku - Part:" & maxProc & " SoundTime:" & gSoundTime & "(" & soundTime & ")" & " PATH:" & gLNum & " gPlay:" & gPlay & " gCountPart" & gCountPart & " Frame:" & the frame
- AutoAction()
- end if
- result = 1
- else
- result = 0
- end if
- end if
- return result
- end if
- 2:
- if timing <> 1 then
- put "PROCESS 2 running" & " Frame:" & the frame
- gCountPart = 999
- case gLNum[1] of
- 2:
- gPartMember = "Physikus"
- 3:
- case gLNum[2] of
- VOID:
- gPartMember = "Chemicus"
- 8:
- gPartMember = "Ch_atmosfera"
- end case
- 4:
- case gLNum[2] of
- VOID:
- gPartMember = "Bioscopia"
- 7:
- gPartMember = "Bio_atmosfera"
- end case
- otherwise:
- gPartMember = "VOIDmember"
- end case
- if gPartMember <> 0 then
- sprite(gVSprite).member = member(gPartMember)
- gProcessTime = member(gPartMember).duration
- sprite(gVSprite).movieRate = 1
- sprite(gVSprite).volume = gVolume
- sprite(gVSprite).width = 530
- sprite(gVSprite).height = 298
- case gPartMember of
- "Bioscopia", "Bio_atmosfera":
- sprite(gVSprite).locV = sprite(gVSprite).locV - 1
- "Chemicus", "Ch_atmosfera":
- sprite(gVSprite).width = 530
- sprite(gVSprite).height = 352
- sprite(gVSprite).locV = sprite(gVSprite).locV - 28
- end case
- updateStage()
- put "VIDEO:" & gPartMember & " Duration:" & member(gPartMember).duration & " Frame:" & the frame
- else
- if (gPartMember = "Chemicus") or (gPartMember = "Ch_atmosfera") then
- gVideoBig[4] = "GODOWN"
- end if
- AutoAction()
- go(the frame + 2)
- end if
- else
- actualTime = sprite(gVSprite).movieTime
- if actualTime < (gProcessTime - 20) then
- result = 0
- else
- sprite(gVSprite).movieRate = 0
- updateStage()
- gProcessTime = 0
- put "VIDEO skoncilo" & " Frame:" & the frame
- if (gPartMember = "Chemicus") or (gPartMember = "Ch_atmosfera") then
- gVideoBig[4] = "GODOWN"
- end if
- AutoAction()
- result = 1
- end if
- return result
- end if
- 3:
- if timing <> 1 then
- gProcessTime = the ticks
- case gLNum[1] of
- 6:
- gPause = 1500
- otherwise:
- gPause = 1200
- end case
- gCountPart = 1
- char1 = string(gLNum[1])
- char2 = string(gLNum[2])
- char3 = string(gLNum[3])
- gPartMember = char1 & char2 & char3 & "-1"
- if member(gPartMember).number <> -1 then
- member("ShowMember").picture = member(gPartMember).picture
- put "PROCESS 4 - flash:" & gPartMember & " Pauza:" & gPause & " Frame:" & the frame
- else
- put "Chyba flash: " & gPartMember & " !!!"
- AutoAction()
- end if
- else
- if (gProcessTime + gPause) < the ticks then
- gProcessTime = the ticks
- put "Koniec pauzy:" & gPause & " PATH:" & gLNum & " Frame:" & the frame
- AutoAction()
- result = 1
- else
- result = 0
- end if
- return result
- end if
- 4:
- if timing <> 1 then
- gProcessTime = the ticks
- case gLNum[1] of
- 6:
- gPause = 1500
- otherwise:
- gPause = 1200
- end case
- gCountPart = 1
- char1 = string(gLNum[1])
- char2 = string(gLNum[2])
- char3 = string(gLNum[3])
- gPartMember = char1 & char2 & char3 & "-1"
- if member(gPartMember).number <> -1 then
- sprite(gVSprite).member = member(gPartMember)
- put "PROCESS 4 - flash:" & gPartMember & " Pauza:" & gPause & " Frame:" & the frame
- else
- put "Chyba flash: " & gPartMember & " !!!"
- AutoAction()
- end if
- else
- if (gProcessTime + gPause) < the ticks then
- gProcessTime = the ticks
- put "Koniec pauzy:" & gPause & " PATH:" & gLNum & " Frame:" & the frame
- AutoAction()
- result = 1
- else
- result = 0
- end if
- return result
- end if
- end case
- end
-
- on CheckProc
- case PlayState() of
- 0:
- result = Process(0, 1)
- 1:
- result = Process(1, 1)
- 2:
- result = Process(2, 1)
- 3:
- result = Process(3, 1)
- 4:
- result = Process(4, 1)
- end case
- return result
- end
-
- on PlayState
- case gLNum[1] of
- VOID:
- result = 0
- 2:
- case gLNum[2] of
- VOID:
- result = 2
- 8:
- result = 3
- otherwise:
- result = 1
- end case
- 4:
- case gLNum[2] of
- VOID:
- result = 2
- 7:
- result = 2
- 8:
- result = 3
- otherwise:
- result = 1
- end case
- 3:
- case gLNum[2] of
- VOID:
- result = 2
- 8:
- result = 2
- 9:
- result = 3
- otherwise:
- result = 1
- end case
- 6:
- result = 4
- otherwise:
- case gLNum[2] of
- VOID:
- result = 0
- otherwise:
- result = 1
- end case
- end case
- return result
- end
-
- on AutoAction
- if gLNum = gAllPath.getLast() then
- nextPath = gAllPath[2]
- else
- nextPath = gAllPath[gAllPath.getOne(gLNum) + 1]
- end if
- put "AUTOACTION-PATH:" & nextPath & " OldPATH:" & gLNum & " Frame:" & the frame
- ChangePath(nextPath[1], nextPath[2], nextPath[3])
- end
-
- on jump level1
- case level1 of
- 1:
- go("Vyuk")
- 2:
- go("Phys")
- 3:
- go("Chem")
- 4:
- go("Bio")
- 5:
- go("Proc")
- 6:
- go("Data")
- end case
- end
-
- on progressBar me, reset
- if reset = 1 then
- sprite(me.spriteNum).locH = 572
- else
- if gPlay <> 2 then
- case PlayState() of
- 1:
- if gSoundName = VOID then
- gSoundName = string(gLNum[1] & gLNum[2] & gLNum[3])
- end if
- if soundBusy(2) then
- if gCountPart = 1 then
- gSoundTime = member(gSoundName).duration
- end if
- soundTime = sound(2).currentTime
- sprite(me.spriteNum).locH = 572 + (soundTime / gSoundTime * 200)
- else
- sprite(me.spriteNum).locH = 572
- end if
- 2:
- actualTime = sprite(gVSprite).movieTime.float
- if actualTime < (gProcessTime - 20) then
- sprite(me.spriteNum).locH = 572 + (actualTime / gProcessTime * 200)
- else
- sprite(me.spriteNum).locH = 572
- end if
- end case
- end if
- end if
- end
-