home *** CD-ROM | disk | FTP | other *** search
- global numpeliculas, ficherolog, peliPuntoContinuacion, volumenpelicula, idioma, primerCursor, ultimoCursor, primerPuppet, ultimoPuppet, posicion, alias, ticksfinal
-
- on startMovie
- openXLib(the pathName & "Fileio.dll")
- end
-
- on exitMovie
- SeleccionaIdioma(1)
- set the volume of member "Pelicula" of castLib "Multimedia" to 256
- end
-
- on InicializarVariables
- clearGlobals()
- set numpeliculas to 5
- set ticksfinal to 3 * 5
- set ficherolog to "C:\CINECDW.DAT"
- set primerPuppet to 1
- set ultimoPuppet to 48
- set volumenpelicula to 256
- set the soundLevel to 7
- set idioma to 1
- end
-
- on DesactivarPuppets
- set i to primerPuppet
- repeat while i <= ultimoPuppet
- puppetSprite(i, 0)
- set i to i + 1
- end repeat
- set j to 2
- end
-
- on ActivarCursores
- set i to primerCursor
- repeat while i <= ultimoCursor
- set the cursor of sprite i to [cast "DEDO", cast "DEDOM"]
- set i to i + 1
- end repeat
- end
-
- on DesactivarCursores
- set i to primerCursor
- repeat while i <= ultimoCursor
- set the cursor of sprite i to 0
- set i to i + 1
- end repeat
- end
-
- on BuscarRollOver inicio, fin
- set res to 0
- if inicio > fin then
- repeat with i = inicio down to fin
- if rollOver(i) then
- set res to i
- exit repeat
- end if
- end repeat
- else
- repeat with i = inicio to fin
- if rollOver(i) then
- set res to i
- exit repeat
- end if
- end repeat
- end if
- return res
- end
-
- on pausa longitud
- set fin to the timer + longitud
- repeat while the timer < fin
- nothing()
- end repeat
- end
-
- on Volver
- if not EsVaciaPila() then
- set menu to ValorPila()
- set parametro to PropiedadPila()
- BorrarPila()
- case menu of
- "Principal":
- SaltarAPrincipal()
- "Cargas":
- set situacion to parametro
- SaltarACargas()
- end case
- else
- SaltarAPrincipal()
- end if
- end
-
- on Transicion param
- if param = 0 then
- puppetTransition(52, 1, 1)
- end if
- end
-
- on RefrescarFotos
- global primerafoto
- repeat with spr1 = 6 to 9
- set spr2 to spr1 + 4
- set spr3 to spr2 + 4
- puppetSprite(spr1, 1)
- puppetSprite(spr2, 1)
- puppetSprite(spr3, 1)
- set incremento to 2 * (spr1 - 6)
- set elmember to the number of member "Foto01a" of castLib "Entregas" + (2 * (primerafoto - 1)) + (2 * (spr1 - 6))
- set the castNum of sprite spr1 to elmember
- set elmember to the number of member "Num01a" of castLib "Entregas" + (2 * (primerafoto - 1)) + (2 * (spr1 - 6))
- set the castNum of sprite spr2 to elmember
- set elmember to the number of member "Tit01a" of castLib "Entregas" + (2 * (primerafoto - 1)) + (2 * (spr1 - 6))
- set the castNum of sprite spr3 to elmember
- end repeat
- end
-
- on BuscarInicioPelicula
- set textoLeido to EMPTY
- set fichero to ficherolog
- set ficheroLectura to FileIO(mnew, "read", fichero)
- if objectp(ficheroLectura) then
- set savedelimiter to the itemDelimiter
- set the itemDelimiter to "|"
- set peliPuntoContinuacion to 0
- set longitudFichero to ficheroLectura(mGetLength)
- repeat while ficheroLectura(mGetPosition) < longitudFichero
- set auxbuffer to ficheroLectura(mReadLine)
- set buffer to char 1 to length(auxbuffer) - 1 of auxbuffer
- set basura to ficheroLectura(mReadChar)
- set lapeli to item 1 of buffer
- set eltiempo to item 2 of buffer
- if lapeli = numpeliculas then
- set peliPuntoContinuacion to value(eltiempo)
- exit repeat
- end if
- end repeat
- repeat while objectp(ficheroLectura)
- ficheroLectura(mdispose)
- end repeat
- set Comprueba to FileIO(mnew, "read", fichero)
- repeat while objectp(Comprueba)
- Comprueba(mdispose)
- end repeat
- set the itemDelimiter to savedelimiter
- else
- set Comprueba to FileIO(mnew, "write", fichero)
- repeat while objectp(Comprueba)
- Comprueba(mdispose)
- end repeat
- set FicheroEscritura to FileIO(mnew, "write", fichero)
- set peliPuntoContinuacion to 0
- set auxbuffer to numpeliculas & "|0" & numToChar(13) & numToChar(10)
- FicheroEscritura(mWriteString, auxbuffer)
- FicheroEscritura(mdispose)
- set Comprueba to FileIO(mnew, "read", fichero)
- repeat while objectp(Comprueba)
- Comprueba(mdispose)
- end repeat
- end if
- end
-
- on GuardarInicioPelicula param1
- set textoLeido to EMPTY
- set fichero to ficherolog
- set ficheroLectura to FileIO(mnew, "read", fichero)
- set encontrado to 0
- if objectp(ficheroLectura) then
- set savedelimiter to the itemDelimiter
- set the itemDelimiter to "|"
- set longitudFichero to ficheroLectura(mGetLength)
- repeat while ficheroLectura(mGetPosition) < longitudFichero
- set auxbuffer to ficheroLectura(mReadLine)
- set buffer to char 1 to length(auxbuffer) - 1 of auxbuffer
- set basura to ficheroLectura(mReadChar)
- set lapeli to item 1 of buffer
- if lapeli = numpeliculas then
- set peliPuntoContinuacion to param1
- set auxbuffer to numpeliculas & "|" & peliPuntoContinuacion
- set textoLeido to textoLeido & auxbuffer & numToChar(13) & numToChar(10)
- set encontrado to 1
- next repeat
- end if
- set textoLeido to textoLeido & buffer & numToChar(13) & numToChar(10)
- end repeat
- if not encontrado then
- set peliPuntoContinuacion to param1
- set auxbuffer to numpeliculas & "|" & peliPuntoContinuacion
- set textoLeido to textoLeido & auxbuffer & numToChar(13) & numToChar(10)
- end if
- repeat while objectp(ficheroLectura)
- ficheroLectura(mdispose)
- end repeat
- set Comprueba to FileIO(mnew, "read", fichero)
- repeat while objectp(Comprueba)
- Comprueba(mdispose)
- end repeat
- set FicheroEscritura to FileIO(mnew, "write", fichero)
- FicheroEscritura(mWriteString, textoLeido)
- FicheroEscritura(mdispose)
- set Comprueba to FileIO(mnew, "read", fichero)
- repeat while objectp(Comprueba)
- Comprueba(mdispose)
- end repeat
- set the itemDelimiter to savedelimiter
- end if
- end
-
- on SeleccionaIdioma id
- set idioma to id
- if id = 1 then
- puppetSprite(8, 1)
- set the castNum of sprite 8 to cast "Bidiom1c"
- set the cursor of sprite 8 to 0
- puppetSprite(9, 0)
- set the cursor of sprite 9 to [cast "DEDO", cast "DEDOM"]
- else
- puppetSprite(9, 1)
- set the castNum of sprite 9 to cast "Bidiom2c"
- set the cursor of sprite 9 to 0
- puppetSprite(8, 0)
- set the cursor of sprite 8 to [cast "DEDO", cast "DEDOM"]
- end if
- mci("setaudio " & alias & " stream to " & id)
- end
-
- on ActualizaContador
- set eltiempo to the movieTime of sprite 20
- set minutos to eltiempo / 3600
- set segundos to eltiempo mod 3600 / 60
- if minutos < 10 then
- set minutos to "0" & minutos
- end if
- if segundos < 10 then
- set segundos to "0" & segundos
- end if
- set the text of member "Tiemposa" of castLib "Graficos" to minutos & ":" & segundos
- set the text of member "Tiemposb" of castLib "Graficos" to minutos & ":" & segundos
- puppetSprite(12, 1)
- set the locH of sprite 12 to the locH of sprite 10 - 15
- end
-