Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

onMouseDown and onRollOver events at the same time

Posted on 2006-11-12
3
Medium Priority
?
311 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

604 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