home *** CD-ROM | disk | FTP | other *** search
- global spLinea, spListaProgramas, spPrograma, actFoto, despFoto, listaFotos
-
- on inicializar
- spListaProgramas = 90
- spPrograma = 110
- despFoto = 274
- actFoto = 1
- spLinea = 100
- ocultarListaProgramas()
- ocultarPrograma()
- aFoto = the moviePath & "punto.bmp"
- put aFoto
- member("foto").fileName = aFoto
- end
-
- on mostrarPrograma conFoto
- repeat with i = 0 to 18
- sprite(spPrograma + i).visible = 1
- end repeat
- if conFoto <> actFoto then
- Dir = 1
- if conFoto then
- Dir = -1
- end if
- repeat with i = 1 to 11
- sprite(spPrograma + i).locH = sprite(spPrograma + i).locH + (Dir * despFoto)
- put sprite(spPrograma + i).locH
- end repeat
- end if
- if conFoto then
- sprite(spPrograma).member = "con foto"
- sprite(spPrograma + 19).visible = 1
- else
- sprite(spPrograma).member = "sin foto"
- sprite(spPrograma + 19).visible = 0
- end if
- actFoto = conFoto
- puppetTransition(1)
- updateStage()
- borrarLineas()
- end
-
- on ocultarPrograma
- repeat with i = 0 to 19
- sprite(spPrograma + i).visible = 0
- end repeat
- end
-
- on mostrarListaProgramas
- r = sprite(spListaProgramas).rect
- r = inflate(r, -2, -2)
- dibujarLineas(r)
- repeat with i = 0 to 5
- sprite(spListaProgramas + i).visible = 1
- end repeat
- updateStage()
- borrarLineas()
- end
-
- on ocultarListaProgramas
- repeat with i = 0 to 5
- sprite(spListaProgramas + i).visible = 0
- end repeat
- ocultarPrograma()
- end
-
- on currentFolder carpeta
- fileList = []
- ruta = the moviePath & carpeta
- repeat with i = 1 to the maxinteger
- n = getNthFileNameInFolder(ruta, i)
- if n = EMPTY then
- exit repeat
- end if
- append(fileList, ruta & "\" & n)
- end repeat
- return fileList
- end
-
- on importarFotos directorio
- listaFotos = []
- listaFotos = currentFolder(directorio)
- spRect = rect(186, 249, 452, 449)
- if listaFotos <> [] then
- member("foto").fileName = listaFotos[1]
- end if
- sprite(spPrograma + 19).rect = spRect
- end
-
- on dibujarPanel spNum, rectangulo
- ancho = rectangulo.right - rectangulo.left
- alto = rectangulo.bottom - rectangulo.top
- sprite(spNum + 5).rect = rectangulo
- sprite(spNum + 6).rect = rectangulo
- updateStage()
- sprite(spNum).locH = rectangulo.left + 42 + 1
- sprite(spNum).locV = rectangulo.bottom + 1
- sprite(spNum + 1).width = ancho - 54
- sprite(spNum + 1).locH = rectangulo.left + 43 + 1
- sprite(spNum + 1).locV = rectangulo.bottom + 1
- lineaDcha = rectangulo.left + 43 + ancho - 54
- sprite(spNum + 2).locH = lineaDcha + 1
- sprite(spNum + 2).locV = rectangulo.bottom + 1
- sprite(spNum + 3).height = alto - 41
- sprite(spNum + 3).locH = lineaDcha + 11 + 1
- sprite(spNum + 3).locV = rectangulo.top + 31 + 1
- sprite(spNum + 4).locH = lineaDcha + 11 + 1
- sprite(spNum + 4).locV = rectangulo.top + 30 + 1
- sprite(spNum + 5).rect = rectangulo
- sprite(spNum + 6).rect = inflate(rectangulo, -8, 0)
- sprite(spNum + 9).locH = rectangulo.right - 10
- sprite(spNum + 9).locV = rectangulo.top + 10
- updateStage()
- borrarLineas()
- end
-
- on ocultarPanel nivel
- repeat with i = nivel to 4
- spNum = (i * 10) + 30
- repeat with j = 0 to 9
- sprite(spNum + j).locH = -1000
- sprite(spNum + j).locV = -1000
- end repeat
- sprite(spNum - 3).locH = -1000
- sprite(spNum - 2).locV = -1000
- end repeat
- ocultarListaProgramas()
- end
-
- on dibujarLineas rectangulo
- ancho = rectangulo.right - rectangulo.left
- alto = rectangulo.bottom - rectangulo.top
- pasos = 10
- d = 0.10000000000000001
- dy1 = rectangulo.top * d
- dy2 = alto * d
- dx1 = rectangulo.left * d
- dx2 = ancho * d
- repeat with i = 1 to pasos
- sprite(spLinea).locV = sprite(spLinea).locV + dy1
- updateStage()
- end repeat
- sprite(spLinea).locV = rectangulo.top
- sprite(spLinea + 1).locV = rectangulo.top
- repeat with i = 1 to pasos
- sprite(spLinea + 1).locV = sprite(spLinea + 1).locV + dy2
- updateStage()
- end repeat
- sprite(spLinea + 1).locV = rectangulo.bottom - 1
- repeat with i = 0 to pasos
- sprite(spLinea + 2).locH = sprite(spLinea + 2).locH + dx1
- updateStage()
- end repeat
- sprite(spLinea + 2).locH = rectangulo.left
- sprite(spLinea + 3).locH = rectangulo.left
- repeat with i = 1 to pasos
- sprite(spLinea + 3).locH = sprite(spLinea + 3).locH + dx2
- updateStage()
- end repeat
- end
-
- on borrarLineas
- sprite(spLinea).locV = 0
- sprite(spLinea + 1).locV = 0
- sprite(spLinea + 2).locH = 0
- sprite(spLinea + 3).locH = 0
- updateStage()
- end
-