AS2 Flash 8: Getting a parameter into a string?

Hi There,

I have a movie clip which has a function on it that loads some xml (actually xml that is created on the fly by php). The problem is that I have several different parameters - 3 in total which have to be tagged on to the URL so that the xml can display correctly.

I have no problem getting the first 2 parameters into the URL, but I cannot get the final one. On the _root I can trace it fine via another function however I can’t get the parameter from the function that lies on the _root, into the URL that sits in another movie clip.

Am I making any sense?

This is what I have for the code that sits in the movie clip:

[COLOR=“Gray”]//load vars for product info[/COLOR]
[COLOR=“Blue”]var[/COLOR] sendProduct_lv:[COLOR=“Blue”]LoadVars[/COLOR] = new [COLOR=“Blue”]LoadVars/COLOR;
[COLOR=“Blue”]var[/COLOR] prodID:[COLOR=“Blue”]Number[/COLOR];
[COLOR=“Blue”]var[/COLOR] popUpUrl:[COLOR=“Blue”]String [/COLOR]= [COLOR=“SeaGreen”]“http://www.mysite.com/xml.php?data=product&id=”[/COLOR]

[COLOR=“Gray”]//declare load popup function[/COLOR]
[COLOR=“Blue”]function[/COLOR] floadPopup(prodID, pageNumber) {
[COLOR=“Blue”]trace[/COLOR]([COLOR=“SeaGreen”]"Your Page Number is: "[/COLOR]+page_mc.pageNumber);
sendProduct_lv.action = [COLOR=“SeaGreen”]“product”[/COLOR];
sendProduct_lv.brochureID = [COLOR=“Blue”]_root[/COLOR].broID;
sendProduct_lv.dataInt = prodID;
sendProduct_lv.[COLOR=“Blue”]sendAndLoad[/COLOR]([COLOR=“SeaGreen”]“actions.php”[/COLOR], sendProduct_lv, [COLOR=“SeaGreen”]“POST”[/COLOR]);
[COLOR=“Gray”]//defines the xml object[/COLOR]
[COLOR=“Blue”]var [/COLOR]xmlData = [COLOR=“Blue”]new XML/COLOR;
//ignores white space in the xml
xmlData.[COLOR=“Blue”]ignoreWhite [/COLOR]= [COLOR=“Blue”]true[/COLOR];
[COLOR=“Gray”]//on load event for the xml, must be defined here and not after the xml itself has been loaded[/COLOR]
xmlData.[COLOR=“Blue”]onLoad [/COLOR]= processXMLData;
[COLOR=“Gray”]//finally loads the xml file[/COLOR]
xmlData.[COLOR=“Blue”]load/COLOR;
[COLOR=“Blue”]trace/COLOR;
}

And this is the code I have for the function that allows me to trace the page number on the _root of my file:

myBook_mc.onPutPage = [COLOR=“Blue”]function[/COLOR](pageNumber, page_mc){
[COLOR=“Blue”]trace[/COLOR]([COLOR=“SeaGreen”]"Your Page Number is: "[/COLOR]+page_mc.pageNumber);
}

What I am trying to do is get the URL that is declared in the first function after xmlData.load to have page=2 or 3 or whatever page I hppen to be on when the function floadPopup is invoked.

Hope this makes sense, any help would be really appreceated as I am having huge headaches with this, thanks in advance.

Cheers :{