4 Replies Latest reply on Sep 23, 2009 9:20 AM by kglad

    Control multiple visibles

    AESS1981 Level 1

      Hi,

       

      I have a set of mcs on the stage called:

      'menu1_wht', 'menu2_wht', 'menu3_wht', 'menu4_wht'.

       

      Initially, all these mcs are set to _visible = false apart from 'menu1_wht' which is visible.

       

      When the 'next image' button is clicked, I need the following to happen:

      - All mcs to go invisible, then 'menu2_wht' to become visible

       

      When 'next' button is clicked again:

      - All mcs to go invisible, then 'menu3_wht' to become visible

      When 'next' button is clicked again:

       

      - All mcs to go invisible, then 'menu4_wht' to become visible

      When 'next' button is clicked again:

       

      - All mcs to go invisible, then 'menu1_wht' to become visible (I need this to happen in a loop from 1-4)

       

       

       

      I have tried the following, unsuccessfully:

       

      on (release){

      _root.changeImage(1);

      for(i=1; i<5; i++){

      _root["menu"+(i+1)+"_wht"]._visible = false; // hide all

      }

      _root["menu"+(pIndex+1)+"_wht"]._visible = true; // show the one

      }

       

       

      Any ideas how I can achieve my goal?

      Thanks!