Hey there, I am creating a custom class with a loadVars object that
gets data from a web page. My problem is I can't get my loadVars
object to load! I think I am setting the onLoad handler in the wrong
place. Might anyone have any ideas how I set this inside my custom
class?

Thanks in advance guys!
Danny


Here is my code:

Class VersionChecker{
        private var my_lv:LoadVars;
               private var xmlAdd:String;
             private var browserType:String;
             private var ipAddress:String;


//receives url to connect to sets onLoad handler
    public function VersionCheck(xmlAddy:String {
                xmlAdd = xmlAddy;
                my_lv.onLoad = function(success:Boolean) {
                        if (success) {
                           trace("loaded");
                                browserType = this.browser;
                                ipAddress = this.ip;
                        } else {
                                trace("load failed");
                        }
                };
                startCheck();
        }

     private function startCheck() {
                trace("version checker starting to check:"+xmlAdd);
                my_lv.load(xmlAdd);
        }
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to