Solved

onMouseDown and onRollOver events at the same time

Posted on 2006-11-12
3
302 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
3 Comments
 
LVL 5

Accepted Solution

by:
blockage1 earned 500 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.

749 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