--- In flexcoders@yahoogroups.com, "nathanpdaniel" <[EMAIL PROTECTED]> wrote: > > I do this sort of thing all the time - without amfphp - not that you > still shouldn't look into it. For starters, your script below is > incorrect. In our HTTPService object - you should have a > parameter 'results' set equal to a function different from the one > which calls the send() method of your HTTPService object. As it > stands, your logRequest.lastResult will be null when you call > logCheck because it hasn't gotten the results back yet. > > > private function logCheck():void{ > > logRequest.send(); > > Alert.show("Check = "+logRequest.lastResult.check); > > } > > > > every time I get "Check = null". What am I doing wrong? > > It should be more like this: > private function logCheck():void{ > logRequest.send(); > } > private function logCheckResults():void{ > Alert.show("Check = "+logRequest.lastResult.check.toString()); > } > > Now, secondly - you may have an issue with "<check>ok</check>" being > what's returned. Flex fishes out what's in between the root tag (in > this case it's what's in the check node). So you probably won't even > have a logRequest.lastResult.check parameter unless you add in a > separate root node (like <root><check>ok</check></root>). Don't > quote me 100% on that, most the XML I generate and return is complex > versus what you're trying to do. Hope this helps out a little! :D >
Ok I figured out everything (there were a lot of errors on my part but on my behalf on the net you find explainations to a lot of difficult stuff but the easy part it's allways a mistery) over the night. I whould look into amfphp but for now I'm happy with the result I have with php spitting out xml to flex now that I know how to handle it. Thankx for the tips!