You need 2 equal signs...
if (this.time==this.stillFor) {
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Alistair
Miller
Sent: Wednesday, October 26, 2005 11:48 AM
To: Flashcoders mailing list
Subject: RE: [Flashcoders] tracking inactivity
You are setting a value here rather than comparing
if (this.time=this.stillFor) {
change to
if (this.time >=this.stillFor) {
Ali
-----Original Message-----
From: Matt Ganz [mailto:[EMAIL PROTECTED]
Sent: 26 October 2005 16:44
To: Flashcoders mailing list
Subject: [Flashcoders] tracking inactivity
hi.
i'm trying to record when there's been inactivity in my site. i got this
code from the archive but don't understand where it's going wrong. for
example, i set it to trace out if the mouse has been inactive for 10
seconds, but instead i get this message right away.
does anyone see anything out of place?
thanks. -- matt.
this.stillFor = 10000; // 10 seconds
this.startTime = getTimer();
this.onMouseMove = function(){
this.time = 0;
this.startTime = getTimer();
trace('Starting timer again'); }
this.onEnterFrame = function(){
this.time = getTimer()-this.startTime;
if (this.time=this.stillFor) {
this.time = 0;
this.startTime = getTimer();
trace('mouse has been still for 10 seconds!');
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Dyson -- the cleaner that doesn't lose suction.
http://www.dyson.com
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders