Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-10-2003, 04:55 PM   PM User | #1
mancroft
New Coder

 
Join Date: Jun 2003
Posts: 29
Thanks: 0
Thanked 0 Times in 0 Posts
mancroft is an unknown quantity at this point
Ensure variable from .asp loaded before used by Flash.

Hello again

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

loadVariablesNum ("http://blah.com/layout/info.asp", 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 ("http://blah.com/pics/" + picnumberdefault + "pix.jpg");

Unfortunately this gets called BEFORE
loadVariablesNum ("http://blah.com/layout/info.asp", 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 ("http://blah.com/pics/" + picnumberdefault + "pix.jpg");

is called?


PHEW! Thanx.
mancroft is offline   Reply With Quote
Old 07-24-2003, 12:38 AM   PM User | #2
STDestiny
Regular Coder

 
Join Date: May 2003
Location: Manassas, VA, USA
Posts: 220
Thanks: 0
Thanked 0 Times in 0 Posts
STDestiny is an unknown quantity at this point
You might want to use a looped if-then-else statement to continually look to make sure the variable has been loaded, then when it is loaded, have the loop load the movie. I don't know ASP, so I couldn't give an example of code, but logically, that should work. Just make sure to set a limit on the number of times it loops.

-Andrew
STDestiny is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:40 AM.


Advertisement
Log in to turn off these ads.