home *** CD-ROM | disk | FTP | other *** search
- property Distancia
- global texto, Ruta, ListaCP, OpcionesCat, OpcionesSubcat, OpcionesProg, spIdioma, spFormato, spLinea, spSubCat, spSO, colorOpciones, colorSeleccion
-
- on mouseUp me
- pointClicked = the mouseLoc
- Miembro = sprite(the currentSpriteNum).member
- opcion = PointToLine(sprite(the currentSpriteNum), pointClicked)
- Distancia = sprite(the currentSpriteNum).locV + linePosToLocV(Miembro, opcion) - 7
- if (opcion >= Miembro.text.lines.count) or (opcion < 0) then
- exit
- end if
- Miembro.forecolor = colorOpciones
- Miembro.line[opcion].forecolor = colorSeleccion
- updateStage()
- case Miembro.name of
- "Categorias":
- ClickMenu(OpcionesCat, opcion)
- "Subcategorias":
- ClickMenu(OpcionesSubcat, opcion)
- "Programas":
- ClickMenu(OpcionesProg, opcion)
- end case
- puppetTransition(0)
- updateStage()
- end
-
- on ClickMenu menu, opcion
- Padre = menu[opcion]
- case ListaCP[#tipo][Padre] of
- "S":
- MenuSubcategorias(Padre)
- "C":
- MenuProgramas(Padre)
- "P":
- DatosPrograma(Padre)
- end case
- end
-
- on MenuSubcategorias Padre
- Ruta = EMPTY
- InicializarSubcategorias()
- InicializarProgramas()
- updateStage()
- s = EMPTY
- if ListaCP[#tipo][Padre + 1] = "P" then
- MenuProgramas(Padre)
- exit
- end if
- Ruta = ListaCP[#titulo][Padre] & "\"
- repeat with X = Padre + 1 to ListaCP[#tipo].count
- if ListaCP[#tipo][X] = "S" then
- exit repeat
- end if
- if ListaCP[#tipo][X] = "C" then
- append(OpcionesSubcat, X)
- s = s & ListaCP[#titulo][X] & RETURN
- end if
- end repeat
- member("Subcategorias").text = s
- sprite(spLinea).locV = Distancia
- sprite(spSubCat).locV = Distancia
- puppetTransition(3, 2)
- end
-
- on MenuProgramas Padre
- p = offset("\", Ruta) + 1
- delete char p to length(Ruta) of Ruta
- InicializarProgramas()
- s = EMPTY
- Ruta = Ruta & ListaCP[#titulo][Padre] & "\"
- repeat with X = Padre + 1 to ListaCP[#tipo].count
- if ListaCP[#tipo][X] <> "P" then
- exit repeat
- end if
- append(OpcionesProg, X)
- s = s & ListaCP[#titulo][X] & RETURN
- end repeat
- member("Programas").text = s
- puppetTransition(3, 2)
- end
-
- on DatosPrograma Padre
- L = ListaCP[#linea][Padre] + 1
- sprite(spFormato).member = texto.line[L].word[1]
- sprite(spIdioma).member = texto.line[L].word[2]
- sprite(spSO).locV = 240
- member("Sistema").text = texto.line[L].word[3]
- r = the pathName & Ruta & texto.line[L].word[4]
- member("Ruta").text = r
- L = L + 1
- member("Descripcion").text = texto.line[L]
- end
-