# How to Make Flash 8 wait for variable value from php?

**URL:** https://forum.kirupa.com/t/how-to-make-flash-8-wait-for-variable-value-from-php/198636
**Category:** programming
**Created:** [August 27, 2006, 2:49am UTC](https://forum.kirupa.com/t/how-to-make-flash-8-wait-for-variable-value-from-php/198636 "2006-08-27T02:49:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![davydany](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@davydany](https://forum.kirupa.com/u/davydany)
#### Post date: [August 27, 2006, 2:49am UTC](https://forum.kirupa.com/t/how-to-make-flash-8-wait-for-variable-value-from-php/198636/1 "2006-08-27T02:49:34Z")

</div>

I am having flash load a php file via loadVariable() method.

but the php file checks for a particular thing from my MySQL Server and then yeilds out a value. How can i have flash wait for this value to come and then proced with the actionscript after the value is recieved. my attepts were something like this:

**With the do…while loop.**  
var rowNum:Number = 0;

do {  
trace(rowNum); //this is just for evaluation purpose  
} while (rowNum==0)

trace(rowNum);  
//and the rest of the script…

\*\*With the If…Then Loop  
\*\*var rowNum:Number = 0;

if (rowNum==0)  
{  
trace(rowNum);  
gotoAndPlay(2) //2 was the previous frame which did not have the stop command.  
{  
else  
{  
trace(rowNum);  
gotoAndPlay(4) //where the rest of the script was waiting for this.  
}

and i always got 0 for rowNum and did not get the value from PHP. what can i do?  
thanx in advance guys!
