Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Flash (all versions)
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
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..?
 
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.
 
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.
 
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





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 06: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 11:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.