Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 01-14-2003, 06:32 AM   #1
ennpoiss
Registered User
 
Join Date: Jan 2003
Posts: 3
Default How to implement double-click in ListBox?

hola everyone!

How to implement mouse double-click event in
ListBox? I need exactly the same functionality of
ListBox plus double-click event to trigger additional
actions. Is it possible? I'm pretty desperate already

thanks in advance,
ennpoiss
ennpoiss is offline   Reply With Quote
Old 01-14-2003, 08:48 AM   #2
jimburton
no sleep til bedtime
 
jimburton's Avatar
 
Join Date: May 2001
Location: Brighton
Posts: 1,322
Default

there isn't a double click event in flash so you have to make your single click event look for it...something like:
ActionScript Code:
counting = false; function clickHandler() {     if (!counting) {         counting = true;         t = getTimer();         trace("startCounting!");     } else {         var now = getTimer();         var elapsed = now-t;         if (elapsed>1000) {             t = now;             trace("startCounting from scratch again!");         } else {             trace("double click!");             counting = false;         }     } }
and where the trace ("double click!") is, put your double click code
jimburton is offline   Reply With Quote
Old 01-14-2003, 12:16 PM   #3
ennpoiss
Registered User
 
Join Date: Jan 2003
Posts: 3
Default

ClickHandler function works well

but.. ListBox selection bar does'nt show up anymore?!?
I need that thing too.

Where is the right place to put this pice of code in my fla
file?

onClipEvent (load) seems to be wrong place..

ennpoiss
ennpoiss is offline   Reply With Quote
Old 01-14-2003, 12:42 PM   #4
jimburton
no sleep til bedtime
 
jimburton's Avatar
 
Join Date: May 2001
Location: Brighton
Posts: 1,322
Default

put it in the main timleine and type 'clickHandler' in the changehandler part of the listbox component parameters inspector....

I don't know what you mean re the selection bar - can you explain? thx,
jimburton is offline   Reply With Quote
Old 01-14-2003, 01:25 PM   #5
ennpoiss
Registered User
 
Join Date: Jan 2003
Posts: 3
Default

thanx man. It works now as needed
Much easyer than I expected

muchos gracias
ennpoiss
ennpoiss is offline   Reply With Quote
Old 01-14-2003, 01:42 PM   #6
jimburton
no sleep til bedtime
 
jimburton's Avatar
 
Join Date: May 2001
Location: Brighton
Posts: 1,322
Default

everythings easy when you know how
jimburton is offline   Reply With Quote
Old 01-14-2003, 01:47 PM   #7
farafiro
Addicted To FLASH
 
farafiro's Avatar
 
Join Date: Dec 2001
Location: Egyptian in UAE
Posts: 12,436
Send a message via MSN to farafiro Send a message via Yahoo to farafiro
Default

here is a cool one also
http://www.layer51.com/proto/d.aspx?f=385
__________________
€* GOD Is Near €*
Questions Don't PM for Questions . Thanks
An eye for an eye, make the whole world blind
_____________________________________________GHANDI
farafiro is offline   Reply With Quote
Reply


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 10:30 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.