A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: What am i missing here?

  1. #1
    Creative Addiction
    Join Date
    Nov 2001
    Location
    Newyork
    Posts
    91

    What am i missing here?

    var request:URLRequest = new URLRequest();


    function postdata(event:MouseEvent):void {
    request.data=txt1.text;
    request.url="process.php";
    request.method=URLRequestMethod.GET;

    trace(txt1.text);
    }


    trace result shows what ever you type in the text field but the data never goes through php any ideas??

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    The request is just the payload, you need a loader to send it:

    PHP Code:
    var loader:URLLoader = new URLLoader();
    loader.load(request); 

  3. #3
    Creative Addiction
    Join Date
    Nov 2001
    Location
    Newyork
    Posts
    91
    still didn't do anything...or may be am too stupid to learn AS3


    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest();


    function postdata(event:MouseEvent):void {
    request.data=txt1.text;
    request.url="process.php";
    request.method=URLRequestMethod.GET;
    trace(txt1.text);

    loader.load(request);

    }

    btn1.addEventListener(MouseEvent.CLICK,postdata);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center