Copy link to clipboard
Copied
Hi everyone,
I am very new to Adobe Animate so I am making my first steps with the software.
I would like to have a button (button_2) that simply shows and hide some text (movieClip_1).
I manage to make it first hidden and then visible but I do not know how to hide it again.
Perhaps I could use a loop?
var _this = this;
_this.movieClip_1.visible = false;
var _this = this;
_this.button_2.on('dblclick', function(){
_this.movieClip_1.visible = true;
});
Thank you
Hi.
Trying using the logical NOT operator.
Like this:
var _this = this;
_this.movieClip_1.visible = false;
_this.button_2.on('dblclick', function ()
{
_this.movieClip_1.visible = !_this.movieClip_1.visible;
});
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
Hi.
Trying using the logical NOT operator.
Like this:
var _this = this;
_this.movieClip_1.visible = false;
_this.button_2.on('dblclick', function ()
{
_this.movieClip_1.visible = !_this.movieClip_1.visible;
});
I hope it helps.
Regards,
JC
Copy link to clipboard
Copied
Thank you so much !
Copy link to clipboard
Copied
You're welcome!