A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] sendandload response error

Threaded View

  1. #1
    Junior Member
    Join Date
    Feb 2010
    Posts
    2

    resolved [RESOLVED] sendandload response error

    the script is working in that if i submit a valid email address it is being added to the Db but the the response from the loadvars is a weird string, see below.
    i have error handling for an invalid email address in my flash movie but their is a server side check too but i always get undefined and some crazy big string.

    totally lost as to why this is occuring, any thoughts/idea would be greatly appreciated?

    AS Code:
    function fnc_submit_email(){
    if(verify_email(str_email)){
    //SUBMIT EMAIL
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    trace("result_lv.return_code = "+result_lv.return_code);
    _root.mc_dialog.str_text = result_lv.return_code;
    trace(result_lv);
    }
    };
    var send_lv:LoadVars = new LoadVars();
    send_lv.str_email = str_email;
    send_lv.sendAndLoad("../scr/email.php", result_lv, "POST");
    }else{
    _root.mc_dialog.str_text = "invalid address";
    }
    }

    PHP Code
    echo "&return_code = ".$result['Result']['Code'];

    Object returned to Flash
    return%5Fcode%20=%20%22%2E%24result%.............. ....
    Last edited by discobear; 02-09-2010 at 12:56 PM.

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