A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [RESOLVED] MOUSE_DOWN versus MOUSE_CLICK - separating the two events

  1. #1
    Member
    Join Date
    Jan 2009
    Posts
    30

    resolved [RESOLVED] MOUSE_DOWN versus MOUSE_CLICK - separating the two events

    I have a series of buttons on a page that I want the user to be able to re-arrange. To do this, I have a MOUSE_DOWN event listener that triggers a startDrag. However, these buttons are also essentially menu items so when user clicks on them, they should load the appropriate URL. Problem is, I don't want them to act as menu buttons when a user is trying to move them about.

    I have three event listeners on each button, one for the MOUSE_DOWN and one for the CLICK event and one for MOUSE_UP but the function associated to the CLICK event also fires on the MOUSE_UP.

    Is there a way to stop this from happening?

  2. #2
    Member
    Join Date
    Jan 2009
    Posts
    30
    Nevermind, I figured it out.
    If the dropTarget doesn't change, it's a CLICK, if it does it's a re-arrangement of the menu items so on the CLICK event, I just check the dropTarget to decide whether to perform the URLRequest or not.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center