Categories
Featured jobs
» More ActionScript, Flash and Flex jobs.
» Advertise a job for free
Our network
Advertisement

 »  Home  »  Tutorials  »  Flash  »  Beginner  »  Doubleclick Event for MovieClip

Doubleclick Event for MovieClip

By Davide Caricato | Published 02/27/2007 | Beginner | Rating:
Doubleclick Event for MovieClip
This little class gives you the opportunity to have two different event handlers for the single Click and for the double Click on a MovieClip Instance.
The only thing you have to do is to link this class to a movie,
To do this, right-click on the movie in library, choose LINKAGE, mark the first check, and write the linkage identifier and the class you want to assign to, according to the image down.



Once you've done this, in the code view, you can use the two new events available, onSingleClick and onDoubleClick.

_root.yourMovie_mc.onSingleClick() {
  // ...  insert your code here.....
}
_root.yourMovie_mc.onDoubleClick() {
    // ...insert your code here...
}

The only thing you don't have to do is to rewrite the onRelease event.
If you need to use it, you can refer to the onSingleClick event.
The onPress event is still available for every use.
The classFile must reside in the same directory where your FLA is placed.

http://www.davidecaricato.com/media/doubleClick.zip


How would you rate the quality of this article?
1 2 3 4 5
Poor Excellent

Verification:
Enter the security code shown below:
img


Add comment

Spread The Word / Bookmark this content

Clesto Digg it! Reddit Furl del.icio.us Spurl Yahoo!


Search Entire Site
Add to Google
Advertisements
Article Options
Latest New Articles
Set up a simple IIS Server for Flash
by Peter McBride

Day 1 at FITC Toronto 2008
by Anthony Pace

Simple reflection effect with AS2
by Jean André Mas

ActionScript.org Meets Josh Tynjala (aka dr_zeus)
by ActionScript.org Staff

Rapidly Create Online Flash Movies to Help Users Market, Sell and Support Software and Hardware
by Sabrina F

mailing list
Enter your email address:
mailing list
Subscribe Unsubscribe
© 2000-2007 actionscript.org! All Rights Reserved.
Read our Privacy Statement and Terms of Use...
Our dedicated server is hosted and managed by WebScorpion Webhosting.