Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Change colour of a button

Avatar

Level 7

How I can change(on Enter event) the colour of a button text to another color and vise versa to default  on exit.

Like links effect

Thanks

1 Accepted Solution

Avatar

Correct answer by
Level 10

You can use this.caption.font.fill.color.value to change the text colour. I've done this using the mouseEnter/mouseExit events to create a rollover effect.

Enter:

this.caption.font.fill.color.value = "255,255,255"; //white

Exit:

this.caption.font.fill.color.value = "0,0,0"; //black

View solution in original post

0 Replies

Avatar

Correct answer by
Level 10

You can use this.caption.font.fill.color.value to change the text colour. I've done this using the mouseEnter/mouseExit events to create a rollover effect.

Enter:

this.caption.font.fill.color.value = "255,255,255"; //white

Exit:

this.caption.font.fill.color.value = "0,0,0"; //black