Error while making button invisible :s


hi, trying make buttons invisible when it's on frame one!

i have code:

 

function btnvisible(evt:event) :void {

if(currentframe == 1) {

                    menu_btn.visible=false;

                    next_btn.visible=false;

                    back_btn.visible=false;

                    text_btn2.visible=false;

          } else (currentframe > 1); {

                    menu_btn.visible=true;

                    next_btn.visible=true;

                    back_btn.visible=true;

          }

}

but buttons visible on frame one, if delete else code invisible, in every frame :s

can tells me wrong code ? :s

function btnvisible(evt:event) :void {

    if(currentframe == 1) {

                        menu_btn.visible=false;

 

                        next_btn.visible=false;

 

                        back_btn.visible=false;

 

                        text_btn2.visible=false;

              } else if(currentframe > 1) {

                        menu_btn.visible=true;

                        next_btn.visible=true;

                        back_btn.visible=true;

              }

    }

 

 

 

or

 

 

 

function btnvisible(evt:event) :void {

    if(currentframe == 1) {

                        menu_btn.visible=false;

 

                        next_btn.visible=false;

 

                        back_btn.visible=false;

 

                        text_btn2.visible=false;

              } else {

                        menu_btn.visible=true;

                        next_btn.visible=true;

                        back_btn.visible=true;

              }

    }



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support