# \[FlashCS4ActionScript2.0\] Need help with conditional statement to trigger an event

**URL:** https://forum.kirupa.com/t/flashcs4actionscript2-0-need-help-with-conditional-statement-to-trigger-an-event/276573
**Category:** flash
**Created:** [December 1, 2008, 2:34am UTC](https://forum.kirupa.com/t/flashcs4actionscript2-0-need-help-with-conditional-statement-to-trigger-an-event/276573 "2008-12-01T02:34:31Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![triplex\_lt\_3](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@triplex\_lt\_3](https://forum.kirupa.com/u/triplex_lt_3)
#### Post date: [December 1, 2008, 2:34am UTC](https://forum.kirupa.com/t/flashcs4actionscript2-0-need-help-with-conditional-statement-to-trigger-an-event/276573/1 "2008-12-01T02:34:31Z")

</div>

I’m a newbie to actionscript, so please bear with my (semi-)stupid question:  
I want to trigger an event when 4 buttons are being set to visible(originally set to .\_visible=false at the beginning of the movie)  
say, the instance names of the buttons are “a”,“b”,“c”,and “d”, and their visibility is triggered by other events.When all of them are triggered/being set to visible, I want a movieclip to play (say, the name of the movieclip is “animation”)  
I tried using the if statement and came up with the following code:

if(a.\_visible==true && b.\_visible==true && c.\_visible==true && d.\_visible==true){  
animation.gotoAndPlay(1);  
}

I tried using that code, but nothing happened to the movie…  
all the events and buttons are located in the main timeline…  
HELLLPP? this is for a school assignment that is due ASAP…:puzzle::puzzle:
