Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 10-17-2002, 12:35 AM   #1
Joe Z
Registered User
Join Date: Oct 2002
Posts: 2
Question How to delay an action after a click?

Is there an action that will count clicks of the mouse and perform after a certain amount has been reached?

I'd like to have the user click on an array of objects at random and after the third click, it then goes to a url. I've seen banners ads do this recently and am trying to learn how.
I'm an action script newbie, but can learn.

Joe Z is offline   Reply With Quote
Old 10-17-2002, 01:07 AM   #2
Registered User
Rupert's Avatar
Join Date: Mar 2001
Location: Melbourne, Australia
Posts: 617

in MX you could do this with a listener of some sort. Assuming you are working in Flash 5 you could put something like this on a movieclip:

ActionScript Code:
onClipEvent (load) {     clickCount = 0; } onClipEvent (mouseUp) {     clickCount++; } onClipEvent (enterFrame) {     if (clickCount == 3) {         trace ("three clcks!"); // or do something..     } }
Rupert is offline   Reply With Quote
Old 10-17-2002, 01:20 AM   #3
Joe Z
Registered User
Join Date: Oct 2002
Posts: 2
Default Thanks, I am on MX

Wow - fast answer! I think I like this place.

I forgot to mention I'm on MX.
I assume the code from Flash 5 will work too. Cant wait to try it.
Joe Z is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 07:38 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.