Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Elapsed Time
27
PC Mac Lan
Accept Only Alpha-Numeric Characters
JTMR Digital Painter
Color Palette Info
CD Door Close, Open - MCI
Director 6.5 Stubs
Sprite on/off
Official Adobe Photoshop 5.0 Studio Techniques
MediaMacros Xtras Mall
 

 

 

Behavior Mouse Clicks: left, left double, right, right double

Added on 5/1/2002

 

Compatibilities:
D7 D8 D8_5 PC

This item has not yet been rated

Author: Sander Falise

Add functionality to left and right mouse clicks and even doubleclicks. Only tested on a PC with Director 8.5.1 but probably works with earlier versions too. Note: the timeout (me.timing) has been used to prevent single mouse clicks to happend before a doubleclick has the time to init.

property l,r,timing

on new me
  me.l = 0 -- left mouse timer
  me.r = 0 -- right mouse timer
  me.timing = 200 -- timeout for functions
  return me
end

on exitFrame me    
    if me.l = 0 then
      nothing
    else if me.l + me.timing < the milliseconds then
      me.l = 0
      -- !!! add function for left mouse click here !!!
    end if
    if me.r = 0 then
      nothing
    else if me.r + me.timing < the milliseconds then
      me.r = 0
      -- !!! add function for right mouse click here !!!
    end if
end

on mouseUp me
    me.l = the milliseconds
    if the doubleClick then
      me.l = 0
       -- !!! add function for double leftmouse click here !!!
    end if  
end

on rightMouseUp me
    me.r = the milliseconds
    if the doubleClick then
      me.r = 0
      -- !!! add function for double right mouse click here !!!
    end if
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail