I have an application that reads a PHP script and populates the Flash applets
using the following on frame 1:
if (_root.c.n <= 0) {
c = new LoadVars();
c.onLoad = showContent;
c.sendAndLoad("varReturn.php",c,"post");
}
A combobox (created with the returned data) is created on frame 61. When a
selection is chosen in the combobox I need to add the value returned from the
combobox to the variable catvar, add this variable to the LoadVars object and
run the script again. It seems to set c.catvar initially but when I use the
'sendAndLoad command the second time c.catvar isn't included.
Is it possible to add variables to a LoadVars object created on frame 1 from
frame 61?
MotionMaker - 29 Apr 2007 19:14 GMT
You are not using sendAndLoad properly.
You need TWO LoadVar variables. One for the sending and one for the return
values. You do not have an onLoad method attached to the send LoadVars object
but rather for the return LoadVars object.
Look at the example in help for LoadVars.sendAndLoad. It is a perfect model to
do what you want to do.