fading issue on mouse over

Get help using Construct 2

Post » Tue Feb 14, 2012 8:42 pm

Hi,

So I'm trying to create a highlight system (when hovering columns)... Let's sum up first what I have so far:

- a one picture background with the columns
- a sprite (plain white) for each column: sized to width and height. Opacity to 50% and visibility initial to innvisible. Behaviors to Fade.

Now on the mouse event (Cursor over Sprite column): Set sprite column visbility to visbile and restart Fade.

For some reason the fading only works on MouseOut (when I exit the bounds of the sprite) but not when I hover it... What am I doing wrong?


To be sure: as I have several columns is there a simplier way to do this in one event? instead of the amount of columns?
B
3
Posts: 4
Reputation: 458

Post » Wed Feb 15, 2012 4:41 pm

Any help appreciated :)
B
3
Posts: 4
Reputation: 458

Post » Wed Feb 15, 2012 5:03 pm

Be sure to post a capx this will make it easier for use to answer you according to your project.
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 7,000
Reputation: 57,795

Post » Wed Feb 15, 2012 9:19 pm

Ah sorry bout that, here is an example:
test.capx
B
3
Posts: 4
Reputation: 458

Post » Thu Feb 16, 2012 10:22 am

fadeBug.capx
you were restarting the fade every tick while the mouse was over the column, so it got stuck at the start of the fading
Last edited by Yann on Sun Sep 14, 2014 9:36 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Thu Feb 16, 2012 10:55 am

Thanks for the help, it seems to work great :)
B
3
Posts: 4
Reputation: 458


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go and 20 guests