Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / General Flash Topics / March 2007



Tip: Looking for answers? Try searching our database.

Button focus if rollover for 3 seconds

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Outside5.com - 30 Mar 2007 15:32 GMT
Hi all,

Is it possible to achieve the same effect as clicking a button by holding the cursor over it for a few seconds?  If so, how would I achieve this?

Many thanks,
Paul
Amy Berry - 30 Mar 2007 16:37 GMT
NOT TESTED === NO FLASH ON THIS COMPUTER.

But you want something that will start a timer on you rollover, fire another
event after three seconds, and quit the timer when it reashes 3 seconds or
when you roll out.

myMovieClip.onRelease = handleRelease;
myMovieClip.onRollOver = handleRollover;
myMovieClip.onRollOut = handleRollout;

var mydate = new Date();

function handleRollover() {
   var mytime = mydate.getTime();
   this.onEnterFrame = fucntion() {
       if (mydate.getTime() - mytime > 3000) {
           this.handleRelease();
           delete this.onEnterFrame;
       }
   }

function handleRollout() {
   delete this.onEnterFrame;
}

function handleRelease() {
   trace("It worked");
}

> Hi all,
>
[quoted text clipped - 3 lines]
> Many thanks,
> Paul
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.