All pastes #798956 Raw Edit

Unnamed

public text v1 · immutable
#798956 ·published 2007-11-27 04:29 UTC
rendered paste body
//Create LoadVars object and load file
var myData = new LoadVars()
//myData.load("anastasio.asp") //asp line


function getData() {
var myTimer:Timer = new Timer(5000, 0);
myTimer.addEventListener(TimerEvent.TIMER, tick, false, 0, true);

gameTimer.start();

myData.load("http://wfmy-iweb01/news/loading/BD/anastasio.php") //php line
myData.ref = this
//Fetch data 
myData.onLoad = function(success){
	
		trace(success);
		
		for(var i=0; i<this.cant; i++){
                myTimer.start();
                function tick(event:Event) {
			// This displays the loaded variables on the stage.  I would like it to display each variable for 5 seconds then switch to the next one
			 var new_txt:TextField = _root.createTextField("Title_txt"+i, i, 271,74, 227, 20)
			 this.ref["Title_txt"+i].htmlText = this["Title"+i]
			  this.ref["Title_txt"+i]._visible=false;
			
							
			    trace(this.ref["Title_txt"+i])

			}
		} 
		
} 

}
//getData();
getID = setInterval(this, "getData", 2000); 

stop()