how to avoid new OnMouseUp happen from old OnMouseUp?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

how to avoid new OnMouseUp happen from old OnMouseUp?

Post by Bugala »

I have here a situation where i click from main menu to credits.

Thing is, in this credit menu there is another button in same location, and when i click to go to credits, it also clicks the credits pages button.


More technically, situation is that there exists two simplebuttons with OnMouseUp option.

I click on Button 2, and first it deletes these 2 buttons, then it creates a credit page that creates 6 new Simplebuttons with OnMouseUp-option.

However, even I dont do anything else, it already thinks this one button was pressed.


I can naturally move this button elsewhere or figure some other fix for it, but what I would really like to know is how should I fix this the clean way.

Is there a command to force clear all event calls for example?

That When Button 2 is pressed, I would first delete those two buttons, then Force clear all event, and after that create new buttons.
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: how to avoid new OnMouseUp happen from old OnMouseUp?

Post by jPV »

How about a short example code of the problem? :)
Bugala
Posts: 1178
Joined: Sun Feb 14, 2010 7:11 pm

Re: how to avoid new OnMouseUp happen from old OnMouseUp?

Post by Bugala »

took example code out and realised the problem. It wasnt actually complaining about button being pressed, but about creation of a button with non existing function :oops:
Post Reply