Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Flash (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 1st, 2010, 10:58 PM
Authorized User
 
Join Date: Aug 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Question Is there Actionscript for double-clicks, like onClick for single-clicks?

simply saying yes isn't amusing ¨¨

ondoubleclick / ondblclick is javascript..?
Reply With Quote
  #2 (permalink)  
Old March 2nd, 2010, 12:17 AM
Authorized User
 
Join Date: Aug 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can you use this?

Code:
on(release){
    if(lastclick - (lastclick=getTimer()) + 500 > 0){
            //do doubleclick action
           trace("double");
    } else {
            //do singleclick action
           trace("single");
    }
}
how would you place a function into this (& leave the single empty/ non-active), I'm trying to replicate this single-click action to a double-click:

Code:
myBook.onClick = function( pageNumber, pageClip, isCornerClick ){
	if( !isCornerClick ){
		bookZoom();
	}
}
Thanks thanks thanks.
Reply With Quote
  #3 (permalink)  
Old March 4th, 2010, 06:48 PM
Authorized User
 
Join Date: Aug 2009
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried things:

http://greenethumb.com/article/24/do...k-event-in-as2

maybe if you've more experience - will use AS3 in future.
Reply With Quote
  #4 (permalink)  
Old January 5th, 2011, 12:18 PM
Registered User
 
Join Date: Jan 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

just make a new button, and apply this code;

on(release){
_root.this.gotoAndStop(2)
}

then put a stop command on frames 1&2 of the button and on the second frame have a button which has the following code;

on(press){
function
}

just function is replaced with the action that you want to happen on a double click
Reply With Quote
Reply


Thread Tools
Display Modes

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Takes 2 clicks to open jagsusa ASP.NET 2.0 Professional 0 January 5th, 2010 12:57 PM
Multiple Button Clicks Handled By One Sub Apocolypse2005 Visual Basic 2008 Essentials 3 May 19th, 2009 07:58 AM
How to count the button clicks bex ASP.NET 2.0 Basics 2 February 13th, 2009 05:34 AM
Chapter 14 Responding to clicks tfackler BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 February 1st, 2005 11:40 AM
Recording clicks on intrapage links tomofdarwin VBScript 3 May 22nd, 2004 12:07 PM



All times are GMT -4. The time now is 09:00 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.