home *** CD-ROM | disk | FTP | other *** search
- factory TAnalyzer
- method mnew
- instance MyPreload, ramNeeded, MyPreload, MyPreload, unLoadCast, MyPreload, n, MyPreload, MyUnload, MyPreload, MyPreload, fStatus, f3DConsole, fMovieConsole, fKozmoConsole, fHistConsole, fObject, fSubsys, fMovie, fMovieStatus, fEmptyBitmap, f3DSprite, fInfo, fLastButtonSprite, f3DDown, fInfoDown, fHelpDown, fFaxDown, fDudaDown, fDataDown, fExpDown, fPhysicDown, fHistDown, fAnimDown, fLastState, fLastMovie, f3DNumLines, f3DNumCols, fAlfa, fTetha
- global gIdiom
- set fLastState to ["Init", "Init", "Init", "Init", "Init", "Init", "Init"]
- set fLastMovie to ["INDEX", "INDEX", "INDEX", "INDEX", "INDEX", "INDEX"]
- set fEmptyBitmap to the number of cast "EmptyBitmap"
- set f3DNumLines to 7
- set f3DNumCols to 12
- set fAlfa to 4
- set fTetha to 1
- set fStatus to "Browse"
- set f3DConsole to 0
- set fMovieConsole to 0
- set fKozmoConsole to 0
- set fHistConsole to 0
- set fObject to EMPTY
- set fSubsys to EMPTY
- set fMovie to EMPTY
- set fMovieStatus to 0
- set fLastButtonSprite to 0
- set f3DDown to the number of cast "3DDown"
- set fInfoDown to the number of cast "InfoDown"
- set fHelpDown to the number of cast ("HelpDown" & gIdiom)
- set fDudaDown to the number of cast "DudaDown"
- set fDataDown to the number of cast "DataDown"
- set fExpDown to the number of cast "ExpDown"
- set fPhysicDown to the number of cast "PhysicDown"
- set fHistDown to the number of cast "HistDown"
- set fAnimDown to the number of cast "AnimDown"
-
- method mDetatchObjects
- set fObject to EMPTY
- set fSubsys to EMPTY
-
- method mShow
- put "Analyzer status: " & fStatus
- if f3DConsole then
- put "3D console is open."
- else
- put "3D console is closed."
- end if
- if fMovieConsole then
- put "Movie console is open."
- else
- put "Movie console is closed."
- end if
- if fKozmoConsole then
- put "Kozmo console is open."
- else
- put "Kozmo console is closed."
- end if
- if fHistConsole then
- put "History console is open."
- else
- put "History console is closed."
- end if
- if objectp(fObject) then
- put "Object:"
- fObject(mShow)
- end if
- if objectp(fSubsys) then
- fSubsys(mShow)
- end if
-
- method mSetObject ob
- set fObject to ob
-
- method mSetSubsys s
- set fSubsys to s
-
- method mGetObjectName
- if fObject <> EMPTY then
- return fObject(mGetName)
- else
- return EMPTY
- end if
-
- method mGetSubsysName
- if fSubsys <> EMPTY then
- return fSubsys(mGetName)
- else
- return EMPTY
- end if
-
- method mGetObject
- return fObject
-
- method mGetSubsys
- return fSubsys
-
- method mLogBrowse
- global gMovieSprite
- set fStatus to "Browse"
- me(mShowMovieConsole)
- SetCast(gMovieSprite, "VideoConsoleStandby")
- if fSubsys <> EMPTY then
- go(fSubsys(mGetName) & "Browse")
- else
- go(fObject(mGetName) & "Browse")
- end if
-
- method mResetMainContent
- global gObjectSprite, gInfoSprite
- puppetSprite(gInfoSprite, 0)
- SetCast(gVideoSprite, fEmptyBitmap)
- updateStage()
- if fSubsys <> EMPTY then
- put "mResetMainContent:subsistema" && fObject(mGetName)
- SetCast(gObjectSprite, fSubsys(mGetName))
- else
- put "mResetMainContent:objeto" && fObject(mGetName)
- SetCast(gObjectSprite, fObject(mGetName))
- end if
- updateStage()
-
- method mResetCurrButton
- global gVideoSprite
- put "mResetCurrButton:" && fLastButtonSprite && "fStatus" && fStatus
- if fLastButtonSprite > 0 then
- SetCast(gVideoSprite, fEmptyBitmap)
- updateStage()
- sound stop 1
- sound stop 2
- if fStatus = "Hist" then
- me(mHideHistConsole)
- end if
- if fStatus = "3D" then
- me(mHide3DConsole)
- end if
- if fStatus = "Kozmo" then
- me(mHideKozmoConsole)
- end if
- SetCast(fLastButtonSprite, fStatus & "Up")
- puppetSprite(fLastButtonSprite, 0)
- set fLastButtonSprite to 0
- end if
-
- method mLog3D
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, f3DDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- me(mCloseMovie)
- me(mShow3DConsole)
- set fLastButtonSprite to s
- set fStatus to "3D"
- updateStage()
- if fSubsys <> EMPTY then
- set theName to fSubsys(mGetName)
- else
- set theName to fObject(mGetName)
- end if
- MyUnload()
- go(theName & "3D")
-
- method mTurn3DModel
- global gVideoSprite
- set gridSprite to the clickOn
- set gridHeigth to the height of sprite gridSprite
- set gridWidth to the width of sprite gridSprite
- set gridLineWidth to gridHeigth / f3DNumLines
- set gridColWidth to gridWidth / f3DNumCols
- set the cursor of sprite gridSprite to 200
- repeat while the stillDown
- set the cursor of sprite gridSprite to 200
- set x to integer((the mouseH - the right of sprite gridSprite) mod gridWidth / gridColWidth)
- set x to (f3DNumCols - x) mod f3DNumCols
- set y to integer((the mouseV - the top of sprite gridSprite) / gridLineWidth)
- if y < 0 then
- set y to 0
- end if
- if y >= f3DNumLines then
- set y to f3DNumLines - 1
- end if
- set num to x + (y * f3DNumCols)
- set the movieTime of sprite gVideoSprite to num * 5
- updateStage()
- end repeat
- set fAlfa to y
- set fTetha to x
- set the cursor of sprite gridSprite to 0
-
- method mLogInfo
- global gVideoSprite
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fInfoDown)
- click()
- set n to the castNum of sprite gVideoSprite
- if the castType of cast n = #digitalVideo then
- set mr to the movieRate of sprite gVideoSprite
- set the movieRate of sprite gVideoSprite to 0
- updateStage()
- HideVideoSprite()
- updateStage()
- end if
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- me(mHideMovieConsole)
- end if
- set fMovie to EMPTY
- set fLastButtonSprite to s
- set fStatus to "Info"
- updateStage()
- MyUnload()
- if objectp(fSubsys) then
- set dest to label(fSubsys(mGetName) & "Info")
- else
- set dest to label(fObject(mGetName) & "Info")
- end if
- go(dest)
-
- method mLogHelp
- global gVideoSprite
- if the castType of cast the castNum of sprite gVideoSprite = #digitalVideo then
- HideVideoSprite()
- updateStage()
- else
- sound stop 2
- sound stop 1
- end if
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fHelpDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- me(mHideMovieConsole)
- end if
- set fLastButtonSprite to s
- set fStatus to "Help"
- updateStage()
- go("Help")
-
- method mLogDuda
- global gVideoSprite
- set DudaList to fObject(mGetDudaList)
- if DudaList = EMPTY then
- alert("No se encuentra disponible en esta versi├│n Demo")
- else
- if the castType of cast the castNum of sprite gVideoSprite = #digitalVideo then
- HideVideoSprite()
- updateStage()
- else
- sound stop 2
- sound stop 1
- end if
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fDudaDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- set fLastButtonSprite to s
- set fStatus to "Duda"
- updateStage()
- MyUnload()
- go("Duda" & fObject(mGetNextDuda))
- end if
-
- method mLogData
- global gVideoSprite
- set DataList to fObject(mGetDataList)
- if DataList = EMPTY then
- alert("No se encuentra disponible en esta versi├│n Demo")
- else
- if the castType of cast the castNum of sprite gVideoSprite = #digitalVideo then
- HideVideoSprite()
- updateStage()
- else
- sound stop 2
- sound stop 1
- end if
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fDataDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- set fLastButtonSprite to s
- set fStatus to "Data"
- updateStage()
- MyUnload()
- go("Data" & fObject(mGetNextData))
- end if
-
- method mLogKozmo
- global gVideoSprite
- sound stop 1
- sound stop 2
- set n to the castNum of sprite gVideoSprite
- if the castType of cast n = #digitalVideo then
- set mr to the movieRate of sprite gVideoSprite
- set the movieRate of sprite gVideoSprite to 0
- end if
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fExpDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- set fLastButtonSprite to s
- set fStatus to "Kozmo"
- updateStage()
- me(mHideMovieConsole)
- me(mShowKozmoConsole)
- go("KOZMO")
-
- method mLogExp
- global gObjectSprite
- click()
- set fStatus to "Exp"
- updateStage()
- me(mShowMovieConsole)
- puppetSprite(gObjectSprite, 1)
- MyUnload()
- if fSubsys <> EMPTY then
- go(fSubsys(mGetName) & "Exp")
- else
- go(fObject(mGetName) & "Exp")
- end if
-
- method mLogPrinc
- global gVideoSprite
- set thePrinc to EMPTY
- set n to the castNum of sprite gVideoSprite
- put "the castType of cast n" && the castType of cast n
- if the castType of cast n = #digitalVideo then
- set mr to the movieRate of sprite gVideoSprite
- set the movieRate of sprite gVideoSprite to 0
- end if
- set s to the clickOn
- SetCast(s, fPhysicDown)
- click()
- put "fObject" && fObject
- if objectp(fObject) then
- set thePopup to fObject(mGetPrincPopup)
- put "thePopup" && thePopup
- if objectp(thePopup) then
- set thePrinc to thePopup(mShowPopUp, 644, 202, "Left")
- put "entre"
- if thePrinc <> EMPTY then
- set fKozmoConsole to 0
- thePopup(mSetDoubleHilite)
- repeat with i = 6 to 48
- set the castNum of sprite i to 2090
- puppetSprite(i, 0)
- end repeat
- else
- if the castType of cast n = #digitalVideo then
- sound stop 1
- set the movieRate of sprite gVideoSprite to mr
- end if
- end if
- else
- beep(4)
- end if
- end if
- thePopup(mHide)
- SetCast(s, "PhysicUp")
- sound stop 1
- updateStage()
- unLoadCast(fPhysicDown)
- return thePrinc
-
- method mLogHist
- global gHistBtnSprite
- set s to gHistBtnSprite
- puppetSprite(s, 1)
- SetCast(s, fHistDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- set fLastButtonSprite to s
- set fStatus to "Hist"
- updateStage()
- me(mCloseMovie)
- me(mShowHistConsole)
- MyUnload()
- cursor(-1)
- go("Hist")
-
- method mLogAnim
- set s to the clickOn
- puppetSprite(s, 1)
- SetCast(s, fAnimDown)
- click()
- if s <> fLastButtonSprite then
- me(mResetCurrButton)
- end if
- set fLastButtonSprite to s
- set fStatus to "Anim"
- updateStage()
- MyUnload()
- if objectp(fSubsys) then
- set dest to label(fSubsys(mGetName) & "Anim")
- else
- set dest to label(fObject(mGetName) & "Anim")
- end if
- if dest = 0 then
- alert("No disponoble" && fObject(mGetName) & "Anim")
- else
- go(dest)
- end if
-
- method mLogMemorize elLabel, laMovie
- put "mLogMemorize:fLastMovie" && fLastMovie
- put "mLogMemorize:fLastState" && fLastState
- repeat with i = 5 down to 2
- setAt(fLastState, i, getAt(fLastState, i - 1))
- setAt(fLastMovie, i, getAt(fLastMovie, i - 1))
- end repeat
- setAt(fLastState, 1, elLabel)
- setAt(fLastMovie, 1, laMovie)
- put "mLogMemorize:->fLastMovie" && fLastMovie
- put "mLogMemorize:->fLastState" && fLastState
-
- method mShowJump
- put "mShowJump:->fLastMovie" && fLastMovie
- put "mShowJump:->fLastState" && fLastState
-
- method mJumpBack fromWhere
- global gMyStateDestino, gMyMovieDestino, gVideoSprite, gThePhysic
- put "mJumpBack:fLastMovie" && fLastMovie
- put "mJumpBack:fLastState" && fLastState
- set MovieDestino to getAt(fLastMovie, 1)
- set StateDestino to getAt(fLastState, 1)
- set the text of cast "AnalyzerLink" to MovieDestino
- repeat with i = 1 to 5
- setAt(fLastState, i, getAt(fLastState, i + 1))
- setAt(fLastMovie, i, getAt(fLastMovie, i + 1))
- end repeat
- put "mJumpBack:=>fLastMovie" && fLastMovie
- put "mJumpBack:=>fLastState" && fLastState
- if fromWhere = "PRINC" then
- if the castType of cast the castNum of sprite gVideoSprite = #digitalVideo then
- gThePhysic(mHideMovieConsole)
- SetCast(gVideoSprite, "EmptyBitmap")
- end if
- set gMyStateDestino to StateDestino
- set gMyMovieDestino to MovieDestino
- go("JumpToAnalyzer")
- else
- if the castType of cast the castNum of sprite gVideoSprite = #digitalVideo then
- me(mHideMovieConsole)
- SetCast(gVideoSprite, "EmptyBitmap")
- end if
- set gMyStateDestino to StateDestino
- set gMyMovieDestino to MovieDestino
- go(StateDestino, MovieDestino)
- end if
-
- method mShowMovieConsole
- if not fMovieConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "ShowMovieConsole"
- set fMovieConsole to 1
- RestoreSpritesStatus()
- end if
-
- method mHideMovieConsole
- global gMovieSprite
- if fMovieConsole then
- SetCast(gMovieSprite, fEmptyBitmap)
- StoreSpritesStatus()
- SetSprites()
- play frame "HideMovieConsole"
- set fMovieConsole to 0
- RestoreSpritesStatus()
- end if
-
- method mShow3DConsole
- if not f3DConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "Show3DConsole"
- set f3DConsole to 1
- RestoreSpritesStatus()
- end if
-
- method mHide3DConsole
- HideVideoSprite()
- if f3DConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "Hide3DConsole"
- set f3DConsole to 0
- RestoreSpritesStatus()
- end if
-
- method mShowHistConsole
- if not fHistConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "ShowHistConsole"
- set fHistConsole to 1
- RestoreSpritesStatus()
- end if
-
- method mHideHistConsole
- global gMovieSprite
- SetCast(gMovieSprite, fEmptyBitmap)
- updateStage()
- puppetSprite(gMovieSprite, 0)
- if fHistConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "HideHistConsole"
- set fHistConsole to 0
- RestoreSpritesStatus()
- end if
-
- method mShowKozmoConsole
- if not fKozmoConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "ShowKozmoConsole"
- set fKozmoConsole to 1
- RestoreSpritesStatus()
- end if
-
- method mHideKozmoConsole
- if fKozmoConsole then
- StoreSpritesStatus()
- SetSprites()
- play frame "HideKozmoConsole"
- set fKozmoConsole to 0
- RestoreSpritesStatus()
- end if
-
- method mSetFaxAvailable
- set fFaxAvailable to 1
-
- method mResetFaxAvailable
- set fFaxAvailable to 0
-
- method mIsFaxAvailable
- return(fFaxAvailable)
-
- method mFree
-
- method mShowStatus
- put "Status = " & fStatus
- put "Movie Status = " & fMovieStatus
-
- method mInitMovie theMovie
- global gMovieSprite, gVideoSprite
- cursor(-1)
- set fMovie to theMovie
- puppetSprite(gMovieSprite, 1)
- set fMovieStatus to 1
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPlayDown")
- else
- SetCast(gMovieSprite, "SmallPlayDown")
- end if
- updateStage()
-
- method mCloseMovie
- global gMovieSprite, gVideoSprite
- set fMovie to EMPTY
- SetCast(gMovieSprite, fEmptyBitmap)
- updateStage()
- puppetSprite(gMovieSprite, 0)
- me(mHideMovieConsole)
- HideVideoSprite()
- updateStage()
-
- method mPlayPause
- if fMovieStatus then
- me(mPause)
- else
- me(mPlay)
- end if
-
- method mPlay
- global gVideoSprite, gMovieSprite
- set fMovieStatus to 1
- click()
- if the castNum of sprite gMovieSprite = the number of cast "BigPauseDown" then
- set HistStandby to 1
- else
- set HistStandby to 0
- end if
- if the castNum of sprite gMovieSprite = the number of cast "SmallPauseDown" then
- set MovieStandby to 1
- else
- set MovieStandby to 0
- end if
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPlayDown")
- else
- SetCast(gMovieSprite, "SmallPlayDown")
- end if
- updateStage()
- MyUnload()
- if HistStandby = 1 then
- if the castNum of sprite gVideoSprite <> fEmptyBitmap then
- set the movieRate of sprite gVideoSprite to 1
- end if
- else
- if the castNum of sprite gVideoSprite <> fEmptyBitmap then
- put "parche"
- if (the castType of cast the castNum of sprite gVideoSprite = #digitalVideo) and (MovieStandby = 1) then
- SetCast(gVideoSprite, fEmptyBitmap)
- end if
- end if
- go(marker(0))
- end if
-
- method mPause
- global gVideoSprite, gMovieSprite
- sound stop 1
- sound stop 2
- set s to the clickOn
- set fMovieStatus to 0
- click()
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPauseDown")
- if the castNum of sprite gVideoSprite <> fEmptyBitmap then
- set the movieRate of sprite gVideoSprite to 0
- else
- sound stop 1
- sound stop 2
- end if
- set TheEnd to 0
- repeat while not TheEnd
- if the mouseDown = 1 then
- repeat with i = 26 to 39
- if rollOver(i) then
- set TheEnd to 1
- exit repeat
- end if
- end repeat
- end if
- updateStage()
- end repeat
- else
- SetCast(gMovieSprite, "SmallPauseDown")
- me(mResetCurrButton)
- HideVideoSprite()
- SetCast(gMovieSprite, "VideoConsoleStandby")
- updateStage()
- me(mLogBrowse)
- end if
- updateStage()
-
- method mReplay
- global gMovieSprite
- set dest to the frame
- if fMovie <> EMPTY then
- sound stop 1
- sound stop 2
- HideVideoSprite()
- updateStage()
- click()
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigReplayDown")
- else
- SetCast(gMovieSprite, "SmallReplayDown")
- end if
- updateStage()
- set fPlayStatus to 1
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPlayDown")
- else
- SetCast(gMovieSprite, "SmallPlayDown")
- end if
- updateStage()
- MyUnload()
- if fStatus = "Hist" then
- set dest to label("Hist")
- else
- set dest to marker(0)
- end if
- end if
- go(dest)
-
- method mRewind
- global gVideoSprite, gMovieSprite
- set dest to the frame
- if (fMovie <> EMPTY) and (marker(0) <> label(fMovie)) then
- sound stop 1
- sound stop 2
- HideVideoSprite()
- updateStage()
- click()
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigRewDown")
- else
- SetCast(gMovieSprite, "SmallRewDown")
- end if
- updateStage()
- set fPlayStatus to 1
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPlayDown")
- else
- SetCast(gMovieSprite, "SmallPlayDown")
- end if
- updateStage()
- MyUnload()
- set dest to marker(-1)
- end if
- go(dest)
-
- method mFF
- global gVideoSprite, gMovieSprite
- set dest to the frame
- if (fMovie <> EMPTY) and (marker(1) <> label("END" & fMovie)) then
- sound stop 1
- sound stop 2
- HideVideoSprite()
- updateStage()
- click()
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigFFDown")
- else
- SetCast(gMovieSprite, "SmallFFDown")
- end if
- updateStage()
- set fMovieStatus to 1
- if fStatus = "Hist" then
- SetCast(gMovieSprite, "BigPlayDown")
- else
- SetCast(gMovieSprite, "SmallPlayDown")
- end if
- updateStage()
- MyUnload()
- set dest to marker(1)
- end if
- go(dest)
-
- method mCheckSprite theSprite
- global gMovieSprite
- if fMovie <> EMPTY then
- set theRollOver to rollOver(theSprite)
- set p to point(the mouseH, the mouseV)
- if theRollOver then
- if theSprite = gMovieSprite then
- if fStatus = "Hist" then
- set whichClicked to GetClickedBigVideoButton(p)
- else
- set whichClicked to GetClickedSmallVideoButton(p)
- end if
- if whichClicked = "Rewind" then
- if marker(0) <> label(fMovie) then
- return 1
- else
- return 0
- end if
- else
- if whichClicked = "FF" then
- if marker(1) <> label("END" & fMovie) then
- return 1
- else
- return 0
- end if
- else
- return 1
- end if
- end if
- else
- return 1
- end if
- end if
- end if
- return 0
-