14 Replies Latest reply on Sep 28, 2006 8:23 PM by kglad

    Conversion to Flash 8 from 6 - Movieclip.prototype Problem

    bootyhunta
      I built a flash site a client a few years back in Flash 6.

      I have now begun a redesign for them and I want to upgrade to Flash 8, but some of my code that worked fine in Flash 6, is no longer functional when I change the publish settings to Flash 8 or even Flash 7.

      The two functions in question are using the prototype property. It doesn't give me a error when I publish or even test in the actionscript code view, it just doesn't run. I have tried putting a trace within the function, but it won't even run that.

      Here's the first one.

      Movieclip.prototype.glide = function(x,y,inc){
      this.onEnterFrame = function (){
      var me = this;
      me._x += (x-me._x)/inc;
      me._y += (y-me._y)/inc;
      if (Math.abs(x-me._x)<1){
      me._x = x;
      }
      if (Math.abs(y-me._y)<1){
      me._y = y;
      }
      if ((me._x == x) && (me._y == y)){
      delete this.onEnterFrame;
      trace("glide done!");
      }
      }
      };
      rightMenu.glide(609,91,4);


      ============================================

      Here's the second one:

      // display timer
      count = 1;
      MovieClip.prototype.playTimer = function(){
      if (count == 1){
      setPlayTimer = setInterval(playTimer, 1000);
      count++;
      }else if (count >= 10){
      clearInterval(setPlayTimer);
      count = 1;
      if (currentContent == (bigContentTotal - 1)){
      currentContent = 0;
      contentLoader();
      } else{
      currentContent++;
      contentLoader();
      }
      } else{
      count++;
      }
      };


      Can anyone pick out what needs to changed for compliance in flash 8. I'm sure it's something minor that I am missing.

      Thanks in advance.