A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: MouseEvent.CLICK question?

  1. #1
    Ronze Ronze's Avatar
    Join Date
    Oct 2002
    Location
    Copenhagen, Denmark
    Posts
    185

    MouseEvent.CLICK question?

    Hey everyone

    I have an object called diarypost. Inside diarypost I have a textfield. Now in my mainclass I have an eventListener that listens to the MouseEvent.CLICK like this:

    Code:
    diarypost.addEventListener(MouseEvent.CLICK, sendPostEvent);
    It works fine, and when I click it it executes the sendPostEvent function. the problem is, that if I click in the textfield it sends the textfield inside the diarypost as the event target, and not the diarypost object itself. I want it only to send the diarypost object as the event target, not an specific objects inside the diarypost object. How do I do this?

    Thanks
    --- Ronze ---

  2. #2
    Ronze Ronze's Avatar
    Join Date
    Oct 2002
    Location
    Copenhagen, Denmark
    Posts
    185
    I got it, use the currentTarget instead of target
    --- Ronze ---

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