0 Replies Latest reply on Dec 12, 2007 2:39 PM by Frosty1

    Code fails in AS 2.0


      The flash swf that I have was published in flash 6, AS 1.0. I changed the publishing to use AS 2.0 to take advantage of some new features and my scroll functions have quit working. I believe the code issue is in the code block below:

      Actionscript from the "Content" MC which contains a series of 6 images that are scrolled through:

      onClipEvent (load) {
      //accel = 0.6;
      //rate = 0.2 ;
      accel = 0.6;
      rate = 0.03;
      _root.pos = this._x; //start position

      onClipEvent(enterFrame) {
      xkoord2 = _root.pos - _root.press *_root.width;
      x=x*accel+(xkoord2-_x) * rate;
      if(Math.abs(_root.xkoord2-_x)<1) { _x=_root.xkoord2; }
      The "Content" mc is then loaded into another mc ("pic6 page") which contains a mask layer that covers 3 of the six images in the "Content" mc. With the "pic6 page" mc I have the following actionscript:

      _root.left = false;
      _root.n = 6;
      _root.press = 0;
      _root.width = 280;
      Since switching to pubish in AS 2.0 the scroll feature goes way to far to the left instead of just showing the next 3 images and stopping.

      Any help would be greatly appreciated.