4 Replies Latest reply on Feb 3, 2009 11:33 AM by kglad

    Help with a rotating TOC

    dkcc0330

      I'm a real noobie when it comes to AS. I am using Flash MX 2004 Professional using AS 2.0. Here is what I am trying to do:

      1. I am developing a rotating table of contents. i.e. one page of the TOC will have a listing of features on the site with links to each article. The next will have the same for Recipes, then Wine.
      2. At the bottom of the stage are the words "Features", "Recipe", and "Wine". I'm trying to link each of those words (which have been converted to buttons) to the first frame where that page appears. So if a visitor hasn't finished reading what's available on the features page, for example, clicking on the word "Features" will return him or her to the first frame that the Features page appears and then the movie begins again at that point in the timeline. All of the three buttons are layers in a layer called "Menutext" which has been converted to a movie clip.
      3. The code I am using is this:
      featureb.onRelease = function() {
      gotoAndPlay(1);
      };
      4. For the other two buttons I substitute the name of that button and the frame it begins
      5. I get the following errors when I publish:

      **Error** Symbol=menutext, layer=Wine, frame=1:Line 1: Statement must appear within on handler
      wineb.onRelease = function() {

      **Error** Symbol=menutext, layer=Recipes, frame=1:Line 1: Statement must appear within on handler
      recipesb.onRelease = function() {

      **Error** Symbol=menutext, layer=Features, frame=1:Line 1: Statement must appear within on handler
      featureb.onRelease = function() {

      **Error** Symbol=menutext, layer=Wine, frame=780:Line 1: Statement must appear within on handler
      wineb.onRelease = function() {

      **Error** Symbol=menutext, layer=Features, frame=780:Line 1: Statement must appear within on handler
      featureb.onRelease = function() {

      Total ActionScript Errors: 6 Reported Errors: 6
      What am I doing wrong?