Hi,

Have you tried renaming the function and swapping the order of trace / function call?

   Glen

Ali Drongo wrote:
Hiya, I have a custom class with a loadvars object to post to a php script. For some reason my failed method won't fire.

Can anyone suggest why?

Thanks :)
Ali

//code from inside my class

    //this is not firing
    function failed(){
        trace("failure fired")
    }

    function onXmlLoaded(success:Boolean) {
        trace("onXmlLoaded:"+success);
       if (success) {
        trace("success");
            sent();
       } else {
            //this traces
            trace("failure");
            //but this method wont fire :(
            failed();
       }
    }
function sendData() {
        trace("sendData");
        result_lv = new LoadVars();
        result_lv.onLoad = Delegate.create(this, onXmlLoaded);
        send_lv = new LoadVars();
        send_lv.ToAddress = email_txt.text;
        send_lv.Language = _root.lang;
        trace("vars sending:"+send_lv.ToAddress+":"+send_lv.Language);
send_lv.sendAndLoad("card_sender.php", result_lv, "POST"); }



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to