Skip navigation
joedart
Currently Being Moderated

using loader.addEventListener(...

Jul 29, 2012 3:21 AM

I have a python script to test the use of URLLoader(). The python script simply receives a call and uses cgi to parse it and then sends the same parameter back to me.

----------------------

#! /usr/bin/python


import cgi
form = cgi.FieldStorage()
adobe = form.getvalue('inquire')
adobe = str(adobe)
print "adobe = %s" % adobe

 

----------------------------------------------

The URLLoader is getting to the python script, but I do not seem to get any data back using

 

loader.addEventListener(Event.COMPLETE, handleComplete);

loader.load(request);

 

This should go to my routine for handleComplete() if the Event.COMPLETE actually completes:

 

public function handleComplete(event:Event):void {

var loader:URLLoader = URLLoader(event.target);

my_return_value.text = loader.data.adobe;

my_return_value.visible =true;

 

and that displays down below

 

<mx:TextInput id="my_return_value" width = "200"/>

 

What I want to know is this. What does it take for a Event.COMPLETE to happen? It never shows me anything in the my_return_value

 

Sorry for all the code, but it is seemingly simple. I am not showing the entire listing which includes the URLRequestMethod() etc etc. But I just copied all that and made no changes.

 

thanks again

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points