This content has been marked as final. Show 7 replies
Using just one LoadVars is not the ideal way... have a look at the
sendAndLoad example in Help and note how a sender and a receiver LpadVars is
used. I've never had an issue going that route.
Adobe Community Expert
I think I pasted a new version on that pastebin site... that's kinda cool, never seen that before.
You're using loadVars to send the search and return to the same loadVars. But you're returning an xml string. So you need to assign it to a property of the receiving loadvars and then parse it as xml. Or you could format and send the search query as xml and receive it back as xml as an alternative
Honestly I am WAY over my head with this. I tried to look at the Help files however I can't make heads nor tails of this. I apologize for this but could anyone please explain in depth how it works or post a way it works, I just learned AS, PHP, and ASP in the last 2-3 weeks for this project as such im fried and out of ideas ;P
thank you to the people that tried to help before i just don't have the slightest clue what you are talking about...
for loadVars to work, PHP needs to return a string that says:
etc (it can just be one name=value without the & and others)
In your case, you were returning an XML string to a LoadVars, so php needs to print or echo
that way your receiving LoadVars will have a property called xmlstring with the value of "<something><more>moreValue</more></something>"
LoadVars is basically for sending and receiving name/value pairs.
XML is for sending and receiving xml 'strings', and having local object representation of the xml data as a flash object once its parsed after loading.
You're sending name/values and returning an xml string. if you do that using loadVars you need to do it as a name/value and then parse it into an xml object afterwards.
the other thing that Dave mentioned above is that its probably a good idea to have a sending LoadVars and a receiving one. I would be inclined to do the same.
This is the type of example that's in the documentation...check it out:
I think 2-3 weeks to learn all that is kinda a big ask of yourself (or whoever's asking it of you).
Thank you for that how would I go about having 2 loadvars? I kinda get what I did above because that is the way that i created the login however now what I am trying to do is create a search function that will populate a listbox with data. Then the listbox populates txtboxes with data based on what listbox item is clicked.
the data that I have is in the original format of
I dont have a choice but to work with that if I need to I could convert it to another syntax im going to try and make an ASP script that will return the xml in that format however I dont know the way to create a search function in ASP just PHP do you have any ideas on that?
As for the time restraints quite frankly i don't think they care, I am working with a group on this and i think one of them can create a motion tween (there the IT guys) so I kinda got the short straw if you catch my drift...
Edit: Ok i did get an ASP script that was able to return in that datastyle how will I go about posting variables to it or will I have to link the ASP to another PHP script? Also I dont know how to program te search with it.
Thank You Again
Sorry I don't know much about server side coding (yet), so can't answer those questions. Others may know, but this is primarily an actionscript forum.
You could also have worked with the xml data returned as it was, it would just need to be parsed into a new XML object.
On a side note, I have no idea if its also possible to have the receiving object for a LoadVars sendAndLoad to be an XML object. Others may know and if so, that might be worth checking out.
Have you tried googling for a tutorial on this type of thing? I think that's what you probably need to do in order to understand quickly the what and how.