# Releasing Mouse Event

**URL:** <https://forum.kirupa.com/t/releasing-mouse-event/957>\
**Category:** Uncategorized\
**Created:** [August 4, 2002, 5:02pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957 "2002-08-04T17:02:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![FaTaL](https://avatars.discourse-cdn.com/v4/letter/f/848f3c/32.png) [@FaTaL](https://forum.kirupa.com/u/FaTaL)\
**Post date:** [August 4, 2002, 5:02pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/1 "2002-08-04T17:02:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2002, 7:29pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/2 "2002-08-04T19:29:21Z")

</div>

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  
🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2002, 7:36pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/3 "2002-08-04T19:36:46Z")

</div>

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 :-\

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 4, 2002, 8:21pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/4 "2002-08-04T20:21:36Z")

</div>

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,

```auto

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.

```auto

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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 5, 2002, 2:20am UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/5 "2002-08-05T02:20:50Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 5, 2002, 2:31am UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/6 "2002-08-05T02:31:00Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 5, 2002, 3:03am UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/7 "2002-08-05T03:03:26Z")

</div>

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

[http://www.kirupaforum.com/showthread.php?s=&threadid=385](http://www.kirupaforum.com/showthread.php?s=&threadid=385)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 5, 2002, 3:19am UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/8 "2002-08-05T03:19:15Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2002, 3:20pm UTC](https://forum.kirupa.com/t/releasing-mouse-event/957/9 "2002-08-06T15:20:02Z")

</div>

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
