0 Replies Latest reply on Sep 15, 2011 5:24 PM by bso_71

    combos and lists... can't make it work!!!

    bso_71

      Hi,


      Can somebody help me! I am working in a project using flash 8. I'ts been a while since I used flash, but I am trying to use a comboBox that puts info in a list. But I can't seem to make it work. The contents in the combo do display but nothig aprears in my list. I also want to display more info in text items depending on what the user clicked on the list. But it's not working! If I publish my movie putting flash player 6, then it works!!! I need to publish with flash player 8 so other action scripts work. Can anyone help me!!!!

       

      Thanks a lot!

       

      Becario = function (tipo, nombre, grupo, estado, estudios, campo, universidad, pais, contacto, video, foto) {
          this.tipo = tipo;
          this.nombre = nombre;
          this.grupo = grupo;
          this.estado = estado;
          this.estudios = estudios;
          this.campo = campo;
          this.universidad = universidad;
          this.pais = pais;
          this.contacto = contacto;
          this.foto = foto;
          this.video = video;
         
      };
      //
      menu_cb.mostrar = function() {
          alumno_txt.text = "";
          generacion_txt.text = "";
          grupo_txt.text = "";
          estado_txt.text = "";
          estudios_txt.text = "";
          campo_txt.text = "";
          universidad_txt.text = "";
          pais_txt.text = "";
          contacto_txt.text = "";
          //
          lista_lb.removeAll();
          for (i=0; i<Es_datos.length; i++) {
              if (menu_cb.getSelectedItem().label == Es_datos[i].tipo or menu_cb.getSelectedItem().label == "2001 - 2006" ) {  
                  lista_lb.addItem(Es_datos[i].nombre, Es_datos[i]);
                  lista_lb.setSelectedIndex(0);
                 
              }
          }
      };
      lista_lb.detalles = function() {
          var seleccion = lista_lb.getSelectedItem();
          alumno_txt.text = seleccion.data.nombre;
          generacion_txt.text = seleccion.data.tipo;
          grupo_txt.text = seleccion.data.grupo;
          estado_txt.text = seleccion.data.estado;
          estudios_txt.text = seleccion.data.estudios;
          campo_txt.text = seleccion.data.campo;
          universidad_txt.text = seleccion.data.universidad;
          pais_txt.text = seleccion.data.pais;
          contacto_txt.text = seleccion.data.contacto;
      };
      generaciones = ["2001 - 2006", "2006", "2005", "2004", "2003", "2002", "2001"];
      Es_datos= [];

      //
      Es_datos[0] = new Becario("2006", "Aguilar Gisela", "zapoteco", "Oaxaca", "Doctorado", "Botánica", "definir", "definir", "aguil@yahoo.com.mx", 1, "06_01");
      Es_datos[1] = new Becario("2001", "Aguilar Javier", "mixteco", "Oaxaca", "Maestría", "Economía", "Pontificia Chile", "Chile", "yo@hotmail.com", 0, "01_01");
      Es_datos[2] = new Becario("2003", "Alonzo Sebastián", "purépecha", "Michoacán", "Maestría", "Derechos Humanos", "Universidad Ibero", "México", "au@hotmail.com", 0, "03_01");
      Es_datos[3] = new Becario("2003", "Andrés Graciel", "mixe", "Oaxaca", "Maestría", "Telecomunicaciones", "Politécnico Nacional", "México", "gra@yahoo.com.mx", 0, "03_02");

      //
      menu_cb.setChangeHandler("mostrar", menu_cb);
      lista_lb.setChangeHandler("detalles", lista_lb);
      //
      menu_cb.setDataProvider(generaciones);
      menu_cb.setSelectedIndex(0);
      lista_lb.setSelectedIndex();