So I am trying to load variables from a .php file into a movie clip and then
plug in those variables to various fields and for some reason its not
working...so heres whats going on...(this is for the staff page for my church)
(and yes I have read the tutorials :P )
In the primary timeline we have this line...
loadVariables("./middleware/staff.php?id=" + staffID, staff_panel, "GET");
We are loading the variables into the movie clip which contains our various
fields...the value for staffID is created in the previous frame when the user
click on that person's icon, we know for sure that this is being passed
correctly to this frame, because I have a text box in the main timeline which
displays the number.
The resulting string from the .php file looks like this...
staffNameE=Jason+Webb&staffTitleE=Lead+Pastor&staffDescE=Jason's+bio+goes+here..
.&picLoader=./images/staff_pics/jwebb.jpg&staffEmail=webmaster@brooklife.org
Within the movie clip that the variables are being loaded into we have
this....it loops till the var load is done and then writes the information to
the fields...
while (L ne "stop"){
if (staffNameE ne ""){
staffName = staffNameE;
staffTitle = staffTitleE;
staffDesc.text = staffDescE;
staffPhoto.load(picLoader);
L = "stop";
}
}
So lol what am I doing wrong, it all seems right to me but I am kind of new at
the flash thing...thanks for the help. :)
Gorka Ludlow - 24 Aug 2007 15:21 GMT
Try using the LoadVars object and google for a tutorial on it.
Cheers,
Gorka
http://www.AquiGorka.com/blog
dm34175 - 24 Aug 2007 16:25 GMT
That's how I got to where i am now...
Gorka Ludlow - 27 Aug 2007 15:01 GMT
The LoadVars object works like this:
You load data into the instance name created. Once the data is loaded you can
call the data inside the LoadVars instance: LV_instance.Var. So what you should
do is read a text file, then when the onLoad event is trigerred asign the
variables inside the LoadVars instance to their respective holders (loader,
text area or text boxes): Text_Area_Instance_Name.text =
Load_Vars_Instance.Variable;
Cheers,
Gorka
http://www.AquiGorka.com/blog