Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I'm trying to fade in (and out) my input text box.
Input text boxes don't seem to have an Opacity property so I can't set it to start at 0 without using CSS - and the Tween behaviour doesn't tween CSS.
I've tried using the Fade behaviour too, but that doesn't seem to work - it doesn't fade at all.
What's the correct way of doing this, please?
The text input object is an html element and doesn't play by the same rules as normal objects.
You can achieve the desired result by styling the text box with css. There is an opacity property in css you can adjust by utilizing tween - value with it.
Or you can make your own text input.
I'm reading the documentation on Tween(Value) and it appears to tween some numbers, but I'm not sure how to keep applying that number to the opacity of the textInput over time.
I'm already using CSS to set the initial Opacity to 0.
Any more help appreciated!
Develop games in your browser. Powerful, performant & highly capable.
On trigger-Tween value between 0 and 100 over x seconds
While tween is running, set css opacity to object.tween.value.
Or maybe it was 0 to 255, I forgot the range for opacity/alpha in css.