Newbie here! Click on appear click diappear again?

Hi, Im new to this HELP so much! Ive got an object appears when I click on a button and I want it to disappear when the same button is clicked again! Here's the code I used:

moreInfo.onRelease = function()
{
var tw:Tween = new Tween(keyTech,"_alpha",Strong.easeOut,0,100,1,true);
}

Help, please

You can try something like...

var alphaToBe = 100;

moreInfo.onRelease = function()
{

var tw:Tween = new Tween(keyTech,"_alpha",Strong.easeOut,keyTech._alpha,alphaToBe,1,true);

if(alphaToBe == 100) {}

alphaToBe = 0;

} else {}

alphaToBe = 100;

}

}

I use keyTech._alpha as a starting point for the interpolation, just so that it starts where it is currently.

Tags: Adobe Animate

Similar Questions

Maybe you are looking for

  • Uninstall Roboform, but cannot get rid of Roboform Lite icon in the toolbar.

    I uninstalled the version of Roboform Pro. I was told that some files are still on the pc under a file named "siber". I deleted the folder siber.I can't get rid of the icon in the toolbar of Roboform Lite

  • Replace the power supply for Tecra 8100

    Hi supports, I have Tecra 8100 where his original power supply is dead. I need to buy a new one, but I found that Toshiba has replaced the model of PA2444U adapter with a new model. What model adaptor which is now compatible with Tecra 8100? Thank yo

  • Motorola SB6141, Time Warner Cable...

    Time warner cable has replaced our modem with a Motorola SB6141, have not been able to get my Linksys wireless router to work from... ??  Ask them to bridge the modem, they tell me that it isn't their problem if I can connect to the internet, Yes, I

  • Gears - error when you try to insert values into a table with multiple columns

    Hello I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns. I have: var db = google.gears.factory.create('beta.database'); db.open('developerSet'); db.execute('create tab

  • problems puts provider

    Mijn provider, second first ik net contact had, zegt dat went in order. Zelf ik via mijn our squeeze portable information die het muscles tegendeel; ER is geen our setting, geen setting puts internet, verkeerd aangesloten draden, etc... IK kan wel in