0 Replies Latest reply on Aug 23, 2006 10:48 AM by Newsgroup_User

    updating an AS script

    Level 7
      Hi all,

      I'm trying to follow a really good tutorial about allowing flash to use a
      browser's back button within a movie. (It is by Chris Hendershot and can be
      found here:
      http://www.actionscripts.org/tutorials/intermediate/Enabling_a_back_button_within_flash/in dex.shtml )

      Everything is working okay as long as I publish my flash movie in
      actionscript 1. However, when I publish in AS2 I get errors.

      I'm no AS genius. Can anyone help me update this code?

      if(!_level0.$jslisten_init){
      Stage.$jsvarlistener = new LocalConnection();
      Stage.$jsvarlistener.setVariables = function(query) {
      var i, values;
      var chunk = query.split("&");
      for (i in chunk) {
      values = chunk .split("=");
      _root[values[0]] = values[1];
      }
      };
      Stage.$jsvarlistener.connect(_level0.movieid);
      _level0.$jslisten_init = true;
      }

      The problem is with $jsvarlistener in lines 2, 3 and 11

      lines 2 and 3 give the error:
      **Error** Scene=Scene 2, layer=actions, frame=1:Line 2: There is no property
      with the name '$jsvarlistener'.

      line 11 gives the error:
      **Error** Scene=Scene 2, layer=actions, frame=1:Line 11: There is no method
      with the name '$jsvarlistener'.