Problem reading external variables!

Hi all,
Okay i have a problem where I am reading an ASP page into my flash. It works fine when I am reading into the dynamic text fields but when I want to use a variable for something in the actual flash nothing is working.

Example:

I am reading a Database and everything is working just great, except that there are no more records to read! I have a variable named last which is displayed during the last record set so that i could use it to end the display of the records.

I tried setting it up in an if statement…

if (last ==“yes”)
{
counter = 0;
}

my program pretty much just ignores this statement but when i read the variable last into a dynamic text field on the last record set it will display yes!?!?

Any help would be greatly appreciated.

anyone?

Hi, dizz. I had a similar problem the other day. The corresponding thread my help you solve the problem:

http://www.kirupaforum.com/showthread.php?s=&threadid=13525

Thanks to h88 for all his help.

that really doesnt help me. i am trying to take a variable from the external source and use it in my action script.

That is precisely what that thread was about. Give it another shot; I think you’ll find it useful.

Chances are that the variable hasn’t loaded by the time your actionscript code is exectuted. (The dynamic text field will display it, however, because it updates itself as soon as the variable is loaded, even if all the actionscript code in the frame has been executed.)

h88’s tip on using onLoad is an easy way to solve the problem.