Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/01/2007, 14:17
fab100
 
Fecha de Ingreso: enero-2007
Mensajes: 3
Antigüedad: 17 años, 3 meses
Puntos: 0
Pregunta Carga dinamica de txt en un textfield

Hola, defini un objeto LoadVars para que me cargue un .txt externo. Logre poder ver el contenido que contiene este .txt en formato HTML en mi caja de texto ( que tiene un scroll tambien para poder ver el contenido de .txt ya que es extenso ).
El problema es que solo tengo una noticia en el .txt y quisiera poner mas y nose como. Me podrian decir como tengo que agregar dentro del script una noticia nueva ?...En mi ejemplo este objeto LoadVars se llama noti.
Aca va el codigo:
agradezco mucho
Fab100

System.useCodepage = true;
//
var noti:LoadVars = new LoadVars();
noti.onLoad = function(ok:Boolean):Void {
completar();
};
noti.load("noticia.txt");
//
function completar():Void {
titular.text = noti.titulo;
texto.html = true;
texto.htmlText = noti.noticia;
createTextField("tip", getNextHighestDepth(), 10, 10, 0, 0);
with (tip) {
autoSize = true;
border = true;
borderColor = 0x009900;
background = true;
backgroundColor = 0xffff00;
}
var formato:TextFormat = new TextFormat();
with (formato) {
font = "Arial";
size = 10;
}