Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
setTimeout in a less Ghetto fashion
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  17 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
jiggliemon  
View profile  
 More options May 6 2010, 2:43 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 11:43:21 -0700 (PDT)
Local: Thurs, May 6 2010 2:43 pm
Subject: [Moo] setTimeout in a less Ghetto fashion
I'm trying to achieve this "Menu fade on inactive mouse" effect like
you see in VLC player and the new Quicktime.  Does anyone take issue
with how it's done in the example?

Please tell me there's a better mootools way.

http://www.jsfiddle.net/Y8Phj/3/

-Chase


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 6 2010, 2:49 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 11:49:30 -0700 (PDT)
Local: Thurs, May 6 2010 2:49 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
Cleaned up the code a little more,
and removed the console logs.

http://www.jsfiddle.net/Y8Phj/4/

-Chase

On May 6, 11:43 am, jiggliemon <ch...@agroism.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fábio M. Costa  
View profile  
 More options May 6 2010, 2:56 pm
From: Fábio M. Costa <fabiomco...@gmail.com>
Date: Thu, 6 May 2010 15:56:55 -0300
Local: Thurs, May 6 2010 2:56 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

You could do this:

http://www.jsfiddle.net/Y8Phj/7/

--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces
Twitter: fabiomiranda


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fábio M. Costa  
View profile  
 More options May 6 2010, 2:57 pm
From: Fábio M. Costa <fabiomco...@gmail.com>
Date: Thu, 6 May 2010 15:57:20 -0300
Local: Thurs, May 6 2010 2:57 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

So basically i used link: 'cancel':

http://mootools.net/docs/core/Fx/Fx

--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces
Twitter: fabiomiranda

2010/5/6 Fábio M. Costa <fabiomco...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Eneko Alonso  
View profile  
 More options May 6 2010, 4:11 pm
From: Eneko Alonso <eneko.alo...@gmail.com>
Date: Thu, 6 May 2010 13:11:10 -0700
Local: Thurs, May 6 2010 4:11 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion
Your example, Fabio, does not fade out the menu when the mouse is inactive...

Here is the original code, with a little of cleanup.
http://www.jsfiddle.net/Y8Phj/8/

You can also use the delay() method.

2010/5/6 Fábio M. Costa <fabiomco...@gmail.com>:

--
Eneko Alonso
Software Engineer
http://enekoalonso.com
San Luis Obispo, California

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Fiedler  
View profile  
 More options May 6 2010, 4:15 pm
From: André Fiedler <fiedler.an...@googlemail.com>
Date: Thu, 6 May 2010 22:15:24 +0200
Local: Thurs, May 6 2010 4:15 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

You should cancel the running animation before starting it again.

2010/5/6 Eneko Alonso <eneko.alo...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fábio M. Costa  
View profile  
 More options May 6 2010, 4:15 pm
From: Fábio M. Costa <fabiomco...@gmail.com>
Date: Thu, 6 May 2010 17:15:30 -0300
Local: Thurs, May 6 2010 4:15 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

Oh i didnt understand the "mouse inactive", sorry.
Thanks Eneko.

--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces
Twitter: fabiomiranda


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 6 2010, 4:34 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 13:34:56 -0700 (PDT)
Local: Thurs, May 6 2010 4:34 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
I feel like there should be a better way than using setTimeout.
And on every pixel move, calling the "Tween In" action.

Maybe making a "Move Handler" of some sort.

-Chase

On May 6, 1:11 pm, Eneko Alonso <eneko.alo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 6 2010, 4:38 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 13:38:22 -0700 (PDT)
Local: Thurs, May 6 2010 4:38 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
Forgot to add the link.  I added the "Cancel" on the running tween.
And removes the redundant "mouseenter" event, as we already tackle
this in the mousemove.

Thanks for the 'cancel' bit.

-Chase

On May 6, 1:34 pm, jiggliemon <ch...@agroism.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 6 2010, 4:49 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 13:49:35 -0700 (PDT)
Local: Thurs, May 6 2010 4:49 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
http://www.jsfiddle.net/Y8Phj/11/
Forgot the link again.

On May 6, 1:38 pm, jiggliemon <ch...@agroism.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 6 2010, 5:05 pm
From: jiggliemon <ch...@agroism.com>
Date: Thu, 6 May 2010 14:05:36 -0700 (PDT)
Local: Thurs, May 6 2010 5:05 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
http://www.jsfiddle.net/Y8Phj/12/
Placing two times outs seems to cut down on the load.
It's a bit ugly.
But baring some other way to set a delay, it will suffice.

I've got a mouseMoveTimeout, set to a relatively low time, bypassing
the pixel to pixel call, spreading out the move event.
And the og Timeout, to check for the mouse in-activity.

Is this the best way to accomplish such a task?

-Chase

On May 6, 1:11 pm, Eneko Alonso <eneko.alo...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Hazlett  
View profile  
 More options May 6 2010, 6:04 pm
From: "Matthew Hazlett" <hazl...@gmail.com>
Date: Thu, 6 May 2010 18:04:44 -0400
Local: Thurs, May 6 2010 6:04 pm
Subject: RE: [Moo] Re: setTimeout in a less Ghetto fashion
How about this:
http://www.jsfiddle.net/G5Geb/

There was really no need for all those events, you just need the one.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
André Fiedler  
View profile  
 More options May 6 2010, 6:12 pm
From: André Fiedler <fiedler.an...@googlemail.com>
Date: Fri, 7 May 2010 00:12:53 +0200
Local: Thurs, May 6 2010 6:12 pm
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

Does not detect mouse move...

2010/5/7 Matthew Hazlett <hazl...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Hazlett  
View profile  
 More options May 6 2010, 6:23 pm
From: "Matthew Hazlett" <hazl...@gmail.com>
Date: Thu, 6 May 2010 18:23:14 -0400
Local: Thurs, May 6 2010 6:23 pm
Subject: RE: [Moo] Re: setTimeout in a less Ghetto fashion

oh, didnt know it neeed to

From: mootools-users@googlegroups.com [mailto:mootools-users@googlegroups.com] On Behalf Of André Fiedler
Sent: Thursday, May 06, 2010 6:13 PM
To: mootools-users@googlegroups.com
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

Does not detect mouse move...

2010/5/7 Matthew Hazlett <hazl...@gmail.com>

How about this:
http://www.jsfiddle.net/G5Geb/

There was really no need for all those events, you just need the one.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Hazlett  
View profile  
 More options May 7 2010, 12:21 am
From: "Matthew Hazlett" <hazl...@gmail.com>
Date: Fri, 7 May 2010 00:21:45 -0400
Local: Fri, May 7 2010 12:21 am
Subject: RE: [Moo] Re: setTimeout in a less Ghetto fashion

Dunno, if it's more elegant, but it's in a class:

http://www.jsfiddle.net/JCMkv/

Its more mooish, still needs work but it uses the ideas I was thinking about.  You can change the time between fades in the mousemove function.

Hopefully it gives you a starting point.

From: mootools-users@googlegroups.com [mailto:mootools-users@googlegroups.com] On Behalf Of André Fiedler
Sent: Thursday, May 06, 2010 6:13 PM
To: mootools-users@googlegroups.com
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

Does not detect mouse move...

2010/5/7 Matthew Hazlett <hazl...@gmail.com>

How about this:
http://www.jsfiddle.net/G5Geb/

There was really no need for all those events, you just need the one.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthew Hazlett  
View profile  
 More options May 7 2010, 8:02 pm
From: "Matthew Hazlett" <hazl...@gmail.com>
Date: Fri, 7 May 2010 20:02:58 -0400
Local: Fri, May 7 2010 8:02 pm
Subject: RE: [Moo] Re: setTimeout in a less Ghetto fashion

Don't know why I bothered with this, was bored I guess:

http://www.jsfiddle.net/TFp5A/

Anyway, you can do it in less lines but this uses a countdown timer as opposed to an interval timer.  The advantage is you can reset the ticks on the fly instead of $clearing  the event and restarting it.

The options:

fadeBox: What you want to fade

timeout: How long till an idle mouse triggers a fade

leave: Does leaving trigger an immediate fadeout

Humm, I think this is about as practical as my mootools to .toMoo function.

http://mootools.net/shell/NK4VW/1/  [The <http://groups.google.com/group/mootools-users/browse_thread/thread/cc...>  Post]

From: mootools-users@googlegroups.com [mailto:mootools-users@googlegroups.com] On Behalf Of André Fiedler
Sent: Thursday, May 06, 2010 6:13 PM
To: mootools-users@googlegroups.com
Subject: Re: [Moo] Re: setTimeout in a less Ghetto fashion

Does not detect mouse move...

2010/5/7 Matthew Hazlett <hazl...@gmail.com>

How about this:
http://www.jsfiddle.net/G5Geb/

There was really no need for all those events, you just need the one.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
jiggliemon  
View profile  
 More options May 7 2010, 9:41 pm
From: jiggliemon <ch...@agroism.com>
Date: Fri, 7 May 2010 18:41:06 -0700 (PDT)
Local: Fri, May 7 2010 9:41 pm
Subject: [Moo] Re: setTimeout in a less Ghetto fashion
Wow.  not only is this exactly what i was thinking could be
accomplished w/ mootools, but you also did it very cleanly before i
even could take a stab at it myself.  Inside a class at least.

Thanks Mathew.  Consider this thread closed.

On May 7, 5:02 pm, "Matthew Hazlett" <hazl...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »