Releasing Mouse Event

What i need help with is realeasing a mouse event.

By that I mean, Im clicking on ONE movie clip (movieA) and releasing it on another movie clip (movieB).

But, when I release on movieB, it doesnt get the mouse event, since it was first clicked on movieA, it only does the onRelease on the movie click you Clicked on.

I was wondering if there is a way to RELEASE the mouse event, as in, as soon as they click, it does the onmouseclick event, and then doesnt hold the release to that same movie…get it?

I want the onClick to happen on one movie, and the onRelease to take place on top of another movie, depending on what movie they released their mouse on.

Thank you

Ok I think I know what you mean.

I’m not sure if this is what you want but give this a try:

_root.movieA.onPress = function() {
_root.movieA.gotoAndPlay(“wherever”);
_root.movieB.onRelease = function() {
_root.movieB.gotoAndPlay(“wherever”);
}
}

Hope this helps

Kyle
:slight_smile:

no, i dont think that would work…

movieA and movieB are just examples, im actually duplicating a movie clip many times and I have action set for that movie clip.

But what happens is, When i click on a movie, and i release over another movie, the onRelease doesnt take place, it only takes place when i release on TOP of the same movie i clicked on. I dont want that, so what im trying to do is release the mouse event so it notices the onRelease on another movie…

Hope thats clear :-\

At first glance, I would say to manipulate your clicks by setting a variable on the main timeline by setting a variable like status=

Get it?

so I can say,



on(release){
  _root.status=movie1.clip1.button1active
}


then, on movie two, when you release, you can check the status of the variable on the main timeline.


on(release){
  if(_root.status==movie1.clip1.button1active){
          trace("you clicked on a different movie before you clicked here");
}

I hope that makes sense.
Good luck!

i’ve got a similar or maybe the same problem.

there are two buttons, a blue one and a red one.

when i press the mouse button on the blue button down, a appropriate mouseevent has to be executed. then i keep the mouse button clicked and move over to the red button. there i release the mouse button, and an appr. release-mouse event has to be executed.

how can that be realised?

thx4any help

puma

I still think that is a weird way of doing it… but… here’s another option. It is untested, but I’ll throw it out there…

Your event will NOT register as an on release for a different button than the one where you initiated the click. However, if you were to turn the second button into a movie clip “button2mc”

you could…

click on button 1…execute event…

with mouse still down, go to button 2 and release…

on Release, do a hittest with the mouse cursor on the button2mc…

that is the only other way I can think of…

i solved this, follow this thread, which helped me:

http://www.kirupaforum.com/showthread.php?s=&threadid=385

um… yeah… hittest… and, I don’t think you have to do all the prototyping… but, that doesn’t make it wrong, nor does it make mine wrong. That’s why you just have to love this stuff!

ive found a simple solution for my problem using buttons.

1st button: set a flag in the on (dragOut) event. and do also the things that has to be done.

2nd button: when you release the mouse button, a on (rollOver) event is executed. there you can test if the flag was set and if yes do the things you need there.

puma