• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Show And Hide Button

New Here ,
Sep 13, 2022 Sep 13, 2022

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

Views

168

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 13, 2022 Sep 13, 2022

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

Votes

Translate

Translate
Community Expert ,
Sep 13, 2022 Sep 13, 2022

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 13, 2022 Sep 13, 2022

Copy link to clipboard

Copied

Thank you so much ! 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2022 Sep 13, 2022

Copy link to clipboard

Copied

LATEST

You're welcome!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines