3 Replies Latest reply on Jun 11, 2007 7:17 PM by kglad

    Newbie getting a compiler error

    Rybnoe
      Hi,

      I'm very new to Flash. I get a compiler error when I try to do the Animation example in the Help file. (Found here http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00000026.html).

      Here's the ActionScript in my frame 1 (copy and pasted from the tutorial).:

      stop();


      function startMovie(event:MouseEvent):void
      {
      this.play();
      }
      playButton.addEventListener(MouseEvent.CLICK, startMovie);


      function gotoAuthorPage(event:MouseEvent):void
      {
      var targetURL:URLRequest = new URLRequest(" http://example.com/");
      navigateToURL(targetURL);
      }
      homeButton.addEventListener(MouseEvent.CLICK, gotoAuthorPage);


      It gets a " '{' expected" compiler error on each of the two function lines. Can anyone see what I'm doing wrong?

      (I tried it both as Flash 6 and Flash 8, in case it was a version issue or something. DIdn't help.)

      Thanks
      John