Como crearias un timer para recuperar la informacion de este codigo cada cierto tiempo?...donde Cada cierto tiempo= 2 o 3 minutos
//-- importamos las clases necesarias
import flash.net.*;
import flash.events.*;
import flash.text.TextField;
//-- creamos una instancia de URLLoader para info externa
var loader:URLLoader=new URLLoader();
//-- tipo de info a recibir
loader.dataFormat=URLLoaderDataFormat.VARIABLES;
//-- cual es el archivo que cargaremos
loader.load(new URLRequest("http://estelarisradio.net/mostrar.php"));
//-- listener para cuando la carga este completa
loader.addEventListener(Event.COMPLETE,carga);
//-- funcion a ejecutarse
function carga(event:Event) {
var loader:URLLoader= URLLoader(event.target);
//-- creamos el campo de texto donde se mostrara la info del php
//-- creamos el campo de texto donde se mostrara la info del php
var texto:TextField = new TextField();
texto.type = TextFieldType.DYNAMIC;
texto.border = true;
texto.height = 20;
texto.width = 300;
texto.textColor = 0x0033FF;
texto.x = 0;
texto.y = 0;
texto.text=String(loader.data.dato2);
addChild(texto);
var texto2:TextField = new TextField();
texto2.type = TextFieldType.DYNAMIC;
texto2.border = true;
texto2.height = 20;
texto2.width = 300;
texto.textColor = 0x0033FF;
texto2.x = 310;
texto2.y = 0;
texto2.text=String(loader.data.dato1);
addChild(texto2);
}
Saludos