PDA

View Full Version : trying to insert an variable number in getURL


nodeOne
08-24-2002, 11:59 PM
question from ultra-newbie...

what is the syntax for inserting a numeric variable into a URL in a getURL in flash?

i'm trying to use a variable to complete a URL that goes and gets image according to an itemID (a number) in the url string...

so:

getURL("http://www.myurl.com/viewImage?itemid=1 ", target="myFrame");

how would i make the red number be a variable that flash processes and writes to the url?

for example - i have a button, that on release, i want it to send its id number to that variable to complete tht URL... can i make the buttons instance name that number?

this make any sense?

tia

Jesse
08-25-2002, 05:09 AM
myVariable = 2;
getURL("http://www.myurl.com/viewImage?itemid=" + myVariable);
Easy huh?

nodeOne
08-26-2002, 03:20 PM
super easy. =)

thanks!