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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to