1 Reply Latest reply on Mar 7, 2007 9:17 PM by Pal_w_G

    gotoAndPlay

    WarrenWalsh
      The script validator is rejecting the gotoAndPlay event that I have attached to a button.

      I am trying to move from one frame to another within the same scene using this code;

      stop();
      SiteDetails_btn.onRelease = function(){
      gotoAndPlay("SiteDetails_frm");
      };

      The following message comes up

      must appear within on handler
      SiteDetails_btn.onRelease = function(){

      Total ActionScript Errors: 2 Reported Errors: 2

      I have checked that the frame and the button are named and are used correctly.

      Can anyone help please?
        • 1. Re: gotoAndPlay
          Pal_w_G Level 1
          You have assign this piece of code on a button i think......any script on any symbol needs to be within the clipEvent handler ........... in your case onRelease

          You are targeting a button through path........thefore pace this script on frame...on on the button.....

          if you want to define script on button it will be

          on(release){
          //place your code

          }