Variable Issue

I’m having a little trouble with a presentation I’m working on.

I’m creating a presentation that will, depending on user inputs, change which frames are shown. To do this, I created a dynamic text box to load a text file, hoping to then pass whatever comes up there on to an if/else statement that would determine the appropriate action.

The text is loading into its dynamic text box just fine, but it doesn’t appear to pass along to the if/else statement as even when “if” is true, it performs the “else” action.

Here is the code:

loadText = new LoadVars();
loadText.onLoad = function(success) {
if (success) {
// trace(success);
cambtn.html = true;
cambtn.htmlText = this.text;

The above is on a frame with a dynamic text box with an instance name of “cambtn.”

The variable name for this text box is “cambutn” (I changed it slightly as at one point I theorized that perhaps having them both named the same was screwing things up). Then on the frame that determines where the presentation goes next:

if (cambutn == “4”) {
_root.gotoAndStop (4);}
else {
_root.gotoAndStop (5);}

“4” is, in fact, what’s being loaded into cambtn, and yet the movie is still going to the root’s 5th frame. Where did I go wrong?