Flash question

Out of context: Reply #2

  • Started
  • Last post
  • 2 Responses
  • maximillion_0

    in as2 this is a much better way to do this

    var submitListener:Object = new Object();
    submitListener.click = function(evt:Object) {
    var result_lv:LoadVars = new LoadVars();
    result_lv.onLoad = function(success:Boolean) {
    if (success) {
    result_ta.text = result_lv.welcomeMessage;
    } else {
    result_ta.text = "Error connecting to server.";
    }
    };
    var send_lv:LoadVars = new LoadVars();
    send_lv.name = name_ti.text;
    send_lv.sendAndLoad("http://www... result_lv, "POST");
    };
    submit_button.addEventListener... submitListener);

View thread