4 Replies Latest reply on Sep 27, 2006 6:28 PM by kglad

    Attempting to link to html page

    kclson
      I have made an fla for an intro but I want to create a link to click on that will take the viewer to the next page of the website, which is a regular html page. I have used the help example to apply the following actionscript to a button with a named instance of "enterBtn".

      // Attach to frame
      enterBtn.onRelease = function () {
      getURL(" http://www.mywebsite.net/mainframe.html", "_blank");
      };

      However, with the above code I get the following syntax error;
      **Error** Scene=Scene 4, layer=Glow Behind FrameBTN, frame=309:Line 2: Statement must appear within on handler
      enterBtn.onRelease = function () {

      Total ActionScript Errors: 1 Reported Errors: 1

      >>Am I on the right path? Or do I need to use the:

      var listenerObject:Object = new Object();
      listenerObject.onLoadInit = function(target_mc:MovieClip) {
      target_mc.onRelease = function() {
      getURL(" http://www.mywebsite.net/", "_blank");

      Can anyone help me please?
      Thanks!