Where is your new LoadVars() statement for the my_lv variable?
Also, this:
public function VersionCheck(xmlAddy:String {
Should throw a compiler error
Jason Merrill
Bank of America
GT&O Learning & Leadership Development
eTools & Multimedia Team
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf
>>Of Daniel Glue
>>Sent: Monday, June 04, 2007 10:21 AM
>>To: [email protected]
>>Subject: [Flashcoders] Setting up loadVars onLoad handler
>>within custom class
>>
>>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);
>> }
>>}
>>_______________________________________________
>>[email protected]
>>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
>>
_______________________________________________
[email protected]
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