Hola a todos,

Soy nuevo en esto de los foros y en esto de flash pero he de reconocer que gracias a lo que aqui se escribe he conseguido hacer una web para mi grupo de música...

Os escribo porque tengo un problemilla con la clase LoadVars... en una de las secciones de mi web quiero mostrar un cuadro de texto con las noticias del grupo (Fecha y Noticia) con formatos de texto distintos y con posibilidad de hacer un scroll. Para ello he utilizado codigo que se han descrito en otros post...

Mi scroll tiene un cuadro de texto que se completa con un fichero externo llamado "Noticias.txt" y que contiene variables (para el loadvar) con etiquetas HTML para que "Fecha" y "Noticia" tengan formatos distintos.

Mi problema es que cuando hago un test movie desde el entorno de desarrollo de flash me funciona todfo perfecto pero cuando lo subo al host si pongo en el txt mas de una variable o dentro de cada variabla mas de una etiqueta HTML... me sale "undefined"... Tiene que ver el encoding del fichero .txt???... estoy desesperado!!

Este es el código qeu tengo:

Código :

system.useCodepage = true;

//A continuacion definimos las dimensiones y las coordenadas del ScrollText

ScrollTextHeight = 275;      // En pixels
ScrollTextWidth = ScrollTextHeight * (862/510);      // En pixels
ScrollTextX = 0;         // En pixels
ScrollTextY = 0;         // En pixels
FactorDeMargenLateral = 1/20;
FactorDeMargenSuperior = 10;   // En pixels
MargenBarX = 2;            //En Pixels
MargenBarY = 2;            //En Pixels

//Añadimos (instanciamos) el Objeto Fondo y configuramos sus medidas.
//attachMovie("O_Background", "Background", 0);

this.Background._x = ScrollTextX;
this.Background._y = ScrollTextY;
this.Background._width = ScrollTextWidth;
this.Background._height = ScrollTextHeight;
this.Background._alpha = 50;

//Añadimos (instanciamos) el Objeto ScrollArea y configuramos sus medidas.
attachMovie("O_ScrollArea", "ScrollArea", 2);

this.ScrollArea._x = this.Background._x + (((1/FactorDeMargenLateral) -1)*(this.Background._width*FactorDeMargenLateral));
this.ScrollArea._y = this.Background._y + FactorDeMargenSuperior;
this.ScrollArea._height = this.Background._y + this.Background._height - 2*FactorDeMargenSuperior;

//Añadimos (instanciamos) el Objeto ScrollBar y configuramos sus medidas.
attachMovie("O_ScrollBar", "ScrollBar", 3);

this.ScrollBar._x = this.Background._x + (((1/FactorDeMargenLateral) -1)*(this.Background._width*FactorDeMargenLateral)) + MargenBarX;
this.ScrollBar._y = this.Background._y + FactorDeMargenSuperior + MargenBarY;

//Añadimos (instanciamos) el Objeto Title_Noticias y configuramos sus medidas.
attachMovie("O_Title_Noticias", "Title_Noticias", 4);

this.Title_Noticias._x = (this.Background._x + this.Background._width*2*FactorDeMargenLateral)/6;
this.Title_Noticias._y = FactorDeMargenSuperior;

this.T_TextArea._x = this.Background._x + this.Background._width*2*FactorDeMargenLateral;
this.T_TextArea._y = this.Background._y + FactorDeMargenSuperior;
this.T_TextArea._width = this.Background._width - (5.5)*this.Background._width*FactorDeMargenLateral;
this.T_TextArea._height = this.Background._height - 6*FactorDeMargenSuperior;

desplazamiento = ScrollArea._height - ScrollBar._height;

izquierda = ScrollBar._x;
superior = ScrollBar._y;
derecha = ScrollBar._x;
inferior = desplazamiento;

formato = new TextFormat();
formato.font = "_sans";
formato.size = 10;
formato.align = "left";

T_TextArea.type = "Dynamic";
T_TextArea.selectable = false;
T_TextArea.html = true;
T_TextArea.text = "Cargando datos..."

datos = new LoadVars();
datos.load("Noticias.txt");
datos.ignoreWhite=true;
datos.onLoad = function() {
   i=1;
   Texto11 = "";
   while ((this["fechaNoticia"+i] <> null) and (this["textoNoticia"+i] <> null)) {

      Texto11 = Texto11  + " <br> " +  this["fechaNoticia"+i] + this["textoNoticia"+i];
      i=i+1;
   };

   T_TextArea.text = Texto11;
   T_TextArea.setTextFormat(formato);
   
   ScrollBar.onEnterFrame = function() {
      //-- scroll
      scrollvalue = ScrollBar._y/desplazamiento;
      ////trace("ScrollBar._y: " + ScrollBar._y)
      max = texto.maxscroll;

      texto.scroll = Math.round((scrollvalue*(max-1))+1);
      //-- drag
      ScrollBar.onPress = function() {
         startDrag(this, false, izquierda, superior, derecha, inferior);
      };
      ScrollBar.onRelease = function() {
         stopDrag();
      };
   };

}


y este es el fichero de texto

Código :

fechaNoticia1=<font size="7" color="#990000"> <b>21.03.2007</b> </font> <br>
&textoNoticia1= <font size="7" color="#990000"> <b>   Bla Bla Bla Bla Bla.</b> </font>
&fechaNoticia2=<font size="7" color="#990000"> <b>21.03.2007</b> </font> <br>
&textoNoticia2= <font size="7" color="#990000"> <b>   Bla Bla Bla Bla Bla.</b> </font>

Alguien me puede ayudar???

Muchas gracias!!!!

Código :