15 Replies Latest reply on Jun 3, 2007 6:42 PM by kglad

    Linking Buttons

    Ncgnito
      Hi,

      I know this is probably really easy to do but I'm fairly new to flash, I'm using Flash MX.
      I have a button that I want the user to click on to open a jpeg image. I've tried using this script:

      // Attach to frame
      mybutton.onRelease = function () {
      getURL("pathname", "_blank");
      };

      But all I get is this error message:

      **Error** Scene=Scene 1, layer=action script, frame=1:Line 2: Statement must appear within on handler
      mybutton.onRelease = function () {

      Is the problem that this script doesn't work in MX? Please please please HELP!
      Thank you in advance.