>>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
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
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
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 =
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
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
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
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
8 matches
Mail list logo