Setting and Concatenating Variable Values?

I’m calling a ColdFusion page that generates output in the form of a text file to be used in a scrolling dynamic text field.

So, Instead of calling a text file like so:

//calls a static text file
loadText.load(“StaticTextFile.txt”);

Im calling a ColdFusion page like so:

//calls a Cold Fusion page that sends back a text file for the term “help”
loadText.load(“flashGlossary.cfm?term=help”);

What I would like to do is have buttons in the Movie that will set the value of a variable named “term” and append it to the ColdFusion query string.

Here’s what I mean:

On a button I would set the variable:

//set the value of the variable “term” to “help”
on (release) {
term = “help”;
}

Then later in the movie when I called the content for the text field, I need to tell it to append the value of “term” to the end of the ColdFusion query string.

//set the value of the variable “term” to “help”
loadText.load(“flashGlossary.cfm?term=”+term);

But this does not work? Do I need a complete path for the variable (ie. _root.MCInstance.term) or am I trying to concatenate this incorrectly? Or both :slight_smile:

Any help would be trendously appreciated.

Thanx in advance

your syntax is correct, so i’d say it’s the former; you need to path to your variable.

try tracing term in the same action to be sure of what you’re dealing with.

what do you mean by tracing term in the same action?

a=2;
trace(a);
//returns 2

Trace the variable you are sending (help or term, I don’t remember).

pom :hat:

Thanx guys!

Yes it is a path problem…I’m working on it to dial it in.

For the time being though it seems setting the variable to _global.variablename is working - then I just call the variable by name late rin the movie.

thanx again guys, this forum rocks!