954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to use php variable outside onload function

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
   }
   }
aaloo
Junior Poster in Training
76 posts since Oct 2011
Reputation Points: 22
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: