Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6861787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:34:48+00:00 2026-05-27T02:34:48+00:00

I have a project with Flash Professional CS5 and ActionScript 3. I need to

  • 0

I have a project with Flash Professional CS5 and ActionScript 3.

I need to trigger an event when I drag an object over a particular spot, but haven’t dropped it yet. Then, I need to trigger a different event when I leave that spot (still dragging). However, this should only occur while I am dragging on object.

The traditional mouse over and mouse leave events aren’t working while dragging (only while not dragging).

How do I do this?

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:34:49+00:00Added an answer on May 27, 2026 at 2:34 am

    The reason it’s not working is because the top DisplayObject (the one being dragged, is stealing the events for itself).

    You have a few options, 1st is adding the MOUSE_MOVE event to the dragged object instead of the particular spot, and you could do a hitTestObject() to verify if they overlap, or a hitTestPoint() if the mouse is inside the particular spot.

    So basically do this:

    draggedObject.addEventListener(MouseEvent.MOUSE_MOVE, onMouseMove);
    
    function onMouseMove(evt : MouseEvent) : void {
        var particularSpot : MovieClip = MovieClip(evt.currentTarget.parent).getChildByName("particular spot object name");
        if(particularSpot.hitTestPoint(evt.mouseX, evt.mouseY)) // or use hitTestObject
        {
            // The mouse is on top of particular object
        }
        else
        {
            // The mouse is not on top of particular object
        }
    }
    

    Second one is to disable mouse events for the dragged object with mouseChildren and mouseEnabled properties, but that would break your current dragging, you would have to rearrange your events to the dragged object parent or the stage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project in Flash Professional CS5 and ActionScript 3. I have a
I have a project in Flash Professional CS5 and ActionScript 3. I have various
I have a project in ActionScript 3, Flash Professional CS5.5, and AIR 3. I
I have a Flash Professional CS5 project with ActionScript 3. I have a movieclip
I've never developed Flash before but I have a project where I want to
I have a pure Actionscript 3 project, using flash.* libraries, compiles down to about
As flash professional does not have support of flash player 11 while testing project
I have a flash project where I need to create a lot of text
I have to create an ActionScript 3 project in Flash Builder, and compile with
I have a nicely working actionscript project in Flash Builder 4.5. However, I'd like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.