I seem to have some extraneous characters in the object, I'm new to Actionscript, so I don't know if they belong there or not, and I can't seem to extract the parameter of interest. Here's the code segment:
_root.buttonBkg.onPress = function() {
var wikiload1:LoadVars = new LoadVars();
var wikiload2:LoadVars = new LoadVars();
wikiload1.wikiname = wikiterm;
wikiload2.onLoad = function(success:Boolean) {
trace("entered wikiload1.onLoad function")
if (success) {
_root.createTextField("wikidisplay", _root.getNextHighestDepth(), 0, 150, 550, 380);
_root.wikidisplay.html = true;
_root.wikidisplay.htmlText = wikiload2.displayhtml;
trace("wikiload2.displayhtml is" + wikiload2.displayhtml);
trace(wikiload2.toString());
trace("success route");
}
else {
_root.createTextField("wikidisplay", _root.getNextHighestDepth(), 0, 150, 550, 380);
_root.wikidisplay.text = "Error connecting to server.";
trace("error route");
}
};
wikiload1.sendAndLoad("http://myURL.script.py", wikiload2, "POST");
trace("?wikiname=" + wikiload1.wikiname);
trace("did the sendAndLoad")
}
Here's the trace results:
~/src/Main.as:70:?wikiname=coffee
~/src/Main.as:71:did the sendAndLoad
~/src/Main.as:53:entered wikiload1.onLoad function
~/src/Main.as:58:wikiload2.displayhtml isundefined
~/src/Main.as:59:%0Adisplayhtml=%3Cp%3E%3Cb%3ECoffee%3C%2Fb%3E%3C%2Fp%3E%3Cp%3E%3Cbr%2F%3E%3Cbr%2F%3ECoffee%20is%20a%20brewed%20drink%20prepared%20[MUCH RETURNED VALUE DELETED, IT'S LONG]div%3E%0A&onLoad=%5Btype%20Function%5D
~/src/Main.as:60:success route
Why is wikiload2.displayhtml undefined? Is this an Actionscript error, or to I have some problem with the script it's calling (a python script on a web server).