Ver Mensaje Individual
  #6 (permalink)  
Antiguo 08/03/2010, 14:05
Marumehrts
 
Fecha de Ingreso: marzo-2010
Mensajes: 7
Antigüedad: 14 años, 1 mes
Puntos: 0
Respuesta: Guardar preferencias en AS2

=S intente todo, agarre lo que me dijeron los dos, y lo unico que hace es cuando vuelvo a entrar al index, dejarme en el ComboBox seleccionado el pais que ya habia elegido. Les muestro mi código:

Código action:
Ver original
  1. combo.setStyle("themeColor","haloBlue");
  2. combo.setStyle("backgroundColor",0xE0E1DD);
  3. combo.setStyle("color",0x4d4f53);
  4. combo.dropdown.setStyle("borderStyle", "solid");
  5. combo.dropdown.setStyle("borderColor", 0x4d4f53);
  6. combo.dropdown.setStyle("backgroundColor",0xFFFFFF );
  7. combo.dropdown.setStyle("color",0x000000);
  8. import mx.transitions.easing.*;
  9. combo.setStyle("rollOverColor", 0xC3E7F5);
  10. combo.setStyle("selectionColor", 0xFFFFFF);
  11. combo.setStyle("textSelectedColor", 0x4d4f53);
  12. combo.setStyle("textRollOverColor", 0x4d4f53);
  13. combo.setStyle("fontFamily", "arial");
  14. combo.setStyle("fontSize", 11);
  15. combo.setStyle("openEasing", Bounce.easeOut);
  16.  
  17. alerta_mc._visible=false;
  18. ok_btn.onRelease = function() {
  19.  
  20.     if(combo.selectedIndex == 0){
  21.      alerta_mc._visible=true;
  22.     }
  23.         else if(combo.selectedIndex == 1){
  24.             alerta_mc._visible=false;
  25.             getURL("arindex.html", "_self");
  26.         } else if (combo.selectedIndex == 2) {
  27.             alerta_mc._visible=false;
  28.             getURL("uruindex.html", "_self");
  29.            
  30.         }
  31.     }
  32.  
  33.  
  34. arg_mc._visible=false;
  35. uru_mc._visible=false;
  36.  
  37. combo.addEventListener("change", vista);
  38. function vista () {
  39.     if (combo.selectedIndex == 1) {
  40.         arg_mc._visible=true;
  41.         uru_mc._visible=false;
  42.         } else if (combo.selectedIndex == 2) {
  43.             uru_mc._visible=true;
  44.             arg_mc._visible=false
  45.  
  46. }
  47.  
  48. }
  49.  
  50. var miCookie = SharedObject.getLocal("cookieLocal");
  51.  
  52. myCheck.addEventListener("click", fncGuardar);
  53.  
  54. function fncGuardar(){
  55. miCookie.data.datoCookie = combo.text;
  56. miCookie.flush();
  57. }
  58. combo.addEventListener("change", fncGuardar);
  59.  
  60. if(miCookie.data.datoCookie!=undefined){
  61. combo.text = miCookie.data.datoCookie;
  62. }
  63.  
  64. if(miCookie == "Argentina"){
  65.         getURL("argindex.html", "_self");
  66.       } else if (miCoockie == "Uruguay") {
  67.         getURL("uruindex.html", "_self");
  68. }