0 Replies Latest reply on Oct 23, 2008 11:17 AM by itkutch-bNOyhe

    Actionscript v1 problems in v2 or v3

    itkutch-bNOyhe
      The following is the code from the first frame of a hierarchical menu file (thanks to Ian Kelleigh at http://www.freehandsource.com/_test/hierarchical_menus.html) written in Actionscript v1.0.

      I'd like to use this in an AS v2.0 or 3.0 project. To do so, I know I need to delete all occurrences of "/:" in lines 4-9 and 15, but once completed, I think there must still be a problem with lines 13-16 as the true/false values are not being observed (of course, there could be syntax issues deeper in the file, but let's start here):

      1 //Sets variables to False for keeping track if submenus
      2 //or menus are left open. Try keeping same naming structure
      3 //for the the setMenuClose function to work properly below.
      4 /:subsub2open = false;
      5 /:subsub4open = false;
      6 /:menuleftopen1 = false;
      7 /:menuleftopen2 = false;
      8 /:menuleftopen3 = false;
      9 /:menuleftopen4 = false;
      10 //Closes menus when another is opened.
      11 //This function checks for a total of 10 menus, you can
      12 //change this value to fit your needs
      13 function setMenuClose() {
      14 for (z=0; z<10; z++) {
      15 if (eval("/:menuleftopen"+z) == true) {
      16 eval("menu.menu"+z).gotoAndPlay("Swoop Up");
      17 }
      18 }
      19 }
      20 stop();