aaloo 12 Junior Poster in Training

this is my as2 code , i m trying to get variable t outside the onload function but failed , somebody help me !!!

$i=0;
myData = new LoadVars() 
    myData.load("http://localhost/exercise/"+$i+".php") 
    myData.onLoad = function(succes)
	{ 
      if(succes){ 
          var t:Number =myData.total_pages;
		  a.text=myData.t1
		  b.text=myData.t2
		  c.text=myData.t0
		  tp.text=t
		
                } 
	else trace ("Error loading data") 
    } 

 next_.onRelease = function()
   
		  { 
    $i++;
    if($i<=t)
    {
  submitDataToTextfile();
  trace(t) // this is not working
   }
   }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.