?
Solved

onMouseDown and onRollOver events at the same time

Posted on 2006-11-12
3
Medium Priority
?
310 Views
Last Modified: 2012-06-21
Hi Folks

I have a drag and drop. My problem is when I am dragging "d1_mc" and my cursor is on "drop_01_mc" the Rollover does not work.

It works if I am not dragging "d1_mc"

How can i execute a onRollOver function when I am dragging "d1_mc" and it is on top of "drop_01_mc"

Any Ideas
Thanks

d1_mc.onMouseDown = function(){
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
                  this.startDrag();
                  this.swapDepths(depths++);            
      }      
};

d1_mc.onMouseUp = function (){
      if(this.hitTest(_root._xmouse,_root._ymouse,true)){
            this.stopDrag();
                  if(this.hitTest(drop_01_mc)){
                        this.gotoAndStop(3);
                  }else{
                        this._x = this.origX;
                        this._y = this.origY;
                        playClonk();
                  }
      }
}



drop_01_mc.onRollOver = function (){
      trace("drop01mc rollover");
}

drop_01_mc.onRollOut = function (){
      trace("drop01mc rollout");
}
0
Comment
Question by:rgarimella
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
blockage1 earned 2000 total points
ID: 17926495
One solution would be to create an invisible drop target movieclip on top of d1_mc and attach the rollover handlers to that instead. Make it the same shape as drop_01_mc but set its alpha to 0%.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question