Copy link to clipboard
Copied
What should I add to the " pkta1122 " to click on the button " guzik2 " did not cause
function " pkt1123 " ???
If I click on the " guzik2 " is a scene jumps into my 196 and I want to go to 271 .
[URL=http://www.iv.pl/][/URL]
Please help!
THX!
Copy link to clipboard
Copied
This is my code:
stop();
guzik2.addEventListener(MouseEvent.CLICK, pkta1122);
function pkta1122(mojezdarzenie:MouseEvent): void {
gotoAndPlay(271);
}
function pkta1123(mojezdarzenie:MouseEvent): void {
gotoAndStop(196);
}
guzik2.addEventListener(MouseEvent.MOUSE_OUT, pkta1123);
Copy link to clipboard
Copied
You have two listeners on the same button. If you click on the button and don't move the mouse off the button, then you will go to 271. But as soon as you move off, you will cause the MOUSE_OUT to happen and go to 196. If you only want to go to 271 then remove the second listener.
Copy link to clipboard
Copied
My intention was that there were 2 operations to a single button.
Clicking and not moving function also immediately proceeds to the scene 191 .
Maybe there is another solution to assign two functions to a single button ?
Copy link to clipboard
Copied
You are doing something else wrong then. The pkta1123 function will not be executed until the mouse is moved off the button.