RE: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Merrill, Jason
>>I tend not to use Delegate and go for this easier/cleaner alternative >>this.my_mc.onRelease = function ( ) { I now tend to not use anonymous functions like you have and use Delegate instead. Anonymous functions are bad practice in my opinion. I think your idea is actually messier than Delegat

Re: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Jolyon Russ
I tend not to use Delegate and go for this easier/cleaner alternative private var scope : ClassName = this ; this.my_mc.onRelease = function ( ) { scope.doSomething ( "great!" ) ; } function doSomething ( id : String ) { trace("what's my id: " + id ) ; } On 6/4/07, Daniel Glue <[EMAIL PROTEC

Re: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Daniel Glue
Thanks everyone, I've been reading through the article on scope and using the Delegate Class that Alain reccomended which was very useful and had just come round to code a very similar solution as written out by Fernando, thanks everyone! Danny On 04/06/07, Fernando Castillo <[EMAIL PROTECTED]> w

RE: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Fernando Castillo
Hi Daniel, Just something like this. import mx.utils.Delegate; class VersionChecker{ private var my_lv:LoadVars; private var xmlAdd:String; private var browserType:String; private var ipAddress:String; public function VersionChecker(xmlAddy:String) { my_lv =

RE: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Alain Rousseau
ng up loadVars onLoad handler within custom class Where did you instantiate LoadVars? I don't see it anywhere. But it almost doesn't matter, since you will have scoping problems, look after some kind of delegation (eg. mx.utils.Delegate). Attila DG> Hey there, I am creating a custom cla

RE: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Daniel Portilla Heras
Hi Daniel, Don't you have this line in your code my_lv = new LoadVars(); ? If you don't have this, your loadvars will not work. Bye Daniel Portilla Heras ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search

RE: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread Merrill, Jason
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: [E

Re: [Flashcoders] Setting up loadVars onLoad handler within custom class

2007-06-04 Thread R�kos Attila
Where did you instantiate LoadVars? I don't see it anywhere. But it almost doesn't matter, since you will have scoping problems, look after some kind of delegation (eg. mx.utils.Delegate). Attila DG> Hey there, I am creating a custom class with a loadVars object that DG> gets data from a web p