Where is Mouse Out? in "Events"

Get help using Construct 2

Post » Tue Dec 27, 2011 7:28 pm

Hello guys,

I want to create a button when the position on the mouse is over the button it button change with other button color, but I cant find the action mouseOut or similar action. I have it.

(In my Layout the sprite JUGAR2 is invisible)


Mouse / Cursor is Over JUGAR / JUGAR2 Set Visible
                               Mouse Set Cursor to Hand

But when I out the mouse over the button JUGAR2 it not return with the image JUGAR.

Please let me know what is my problem.

Thanks and sorry for my bad english

Gustavo
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Dec 27, 2011 7:38 pm

Please publish the CAPX or at least the code you use
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Tue Dec 27, 2011 7:43 pm

There's no mouse out event right now. Do it like this:

Mouse is Over JUGAR - > Jugar2 Set Visible (Assuming Jugar2 is on top)
Trigger Once

Mouse is Over Jugar (inverted) -> Jugar2 Set Invisible
Trigger Once

Or

Mouse is Over JUGAR - > Jugar2 Set Visible
Trigger Once                 Jugar Set Invisible

Mouse is Over Jugar (inverted) -> Jugar2 Set Invisible
Trigger Once                           Jugar Set Visible

Also you don't have to create 2 sprites for a button just create one sprite and set frame1 to normal button state and frame2 to over button state and change frame on events accordingly. And remember Trigger Once is your friend. You'll be using it alotKiyoshi2011-12-27 19:45:51
B
58
S
13
G
10
Posts: 632
Reputation: 12,505

Post » Tue Dec 27, 2011 8:00 pm

right click on any condition and click 'invert'.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Tue Dec 27, 2011 8:28 pm

thanks Kiyoshi but Please help me, This is my capx!.http://dl.dropbox.com/u/34409812/test.capx
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Dec 27, 2011 8:35 pm

This should do your trick



Use Right-Click to select "Invert"Weishaupt2011-12-27 20:36:28
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Tue Dec 27, 2011 8:39 pm

Oh!! great Weishaup!! thats funny! now is working!! yeah!!

Thanks so much!
B
33
S
3
G
5
Posts: 44
Reputation: 5,058

Post » Tue Jan 08, 2013 7:06 am

Hey I tried this but apparently it only works on 1 Sprite, why is that?
B
7
S
2
G
3
Posts: 39
Reputation: 2,612


Return to How do I....?

Who is online

Users browsing this forum: mercuryus and 14 guests