all groups > flash actionscript > january 2004 >
You're in the

flash actionscript

group:

putting a variable into getURL in flash


putting a variable into getURL in flash dubland
1/30/2004 11:08:14 PM
flash actionscript: Hi,

I am sure this is a quick fix. But could use some help.

I am pulling a bunch of variables from a php page. from those vairables i want to import a jpg image corresponding to that variable, like:

story_id = 1

so, first of all, I would want to pull "1.jpg" to correspond to that story.

How would I do this?

Second, in addition to that i will have a correspponding url for the person to click on so i want to add this same variable to the end of a URL.

Please help.

thanks.


Re: putting a variable into getURL in flash Jack.
1/30/2004 11:39:12 PM
toLoad = story_id+".jpg";
loaderClip.loadMovie(toLoad);

toUrl = story_id+".html";
getURL(toUrl);

hth

regards
Re: putting a variable into getURL in flash dubland
1/31/2004 12:13:45 AM
thanks,

but didn't seem to work (as far as loading the JPG image) haven't tried the getURL part.

I originally had the image in an "images" directory. But even when i put it in the main directory it didn't work. Any other suggestions.

Thanks so much


Re: putting a variable into getURL in flash Jack.
1/31/2004 12:26:02 AM
make certain the jpegs are non - progressive format
Flash will not load it otherwise,

use trace to check that story_id is what you expect,
and if the images are in a folder,

trace(story_id);
toLoad = "images/"+story_id+".jpg";
loaderClip.loadMovie(toLoad);


regards
Re: putting a variable into getURL in flash dubland
2/9/2004 10:34:22 PM
I can load the jpg fine. At least when i hard code it into the "loadMovie" command.

I checked the variable and it is showing up fine.

But it is still not working.

Any other ideas.

AddThis Social Bookmark Button