Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ensure variable from .asp loaded before used by Flash. 1

Status
Not open for further replies.

mancroft

Programmer
Oct 26, 2002
267
GB
Hello again

I am loading variables into Flash from an .asp file using:

loadVariablesNum (" 0);

One of these variables is called picnumberdefault

I am trying to load the jpg into a clip called the picture by using the following:

_root.thepicture.loadMovie (" + picnumberdefault + "pix.jpg");

Unfortunately this gets called BEFORE
loadVariablesNum (" 0);
has had a chance to load the variable picnumberdefault
so the picture does not get loaded.

Is there any way to ensure that the variable picnumberdefault is loaded from the database BEFORE

_root.thepicture.loadMovie (" + picnumberdefault + "pix.jpg");

is called?


PHEW! Thanx.
 
use loadvars

lv = new LoadVars();
lv.onload = function(){
_root.thepicture.loadMovie (" + lv.picnumberdefault + "pix.jpg");
}
lv.load("

_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Wish you would learn to post code properly, here on TT!

Maybe you will, after your learn to use punctuation!





Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top