4 Replies Latest reply on Jun 2, 2011 7:05 PM by Ned Murphy

    Another aborted Action Script

    Soulbishop

      I'm making a slideshow about 18 images in all 9 thumbnails and 9 full size images. The problem I keep running into is the "a script in this movie is causing flash player 9 to run slowly" error. The Flash is set to player 9 and action script 2.0. I have followed the uninstall reinstall tips in other threads and even tried it on another machines, ultimately coming up with the same results. I have read that there could possibly be too much script on the single frame so that said here is the script that is all on that first and only frame.

       

      this.createEmptyMovieClip("container",1);

      var imagesNumber:Number = 9;

      for (i=1; i<=imagenumber; i++) {

      container.attachMovie ("Cakethumb0"+i, "Cakethumb0"+i+"_mc",i);

      Cakethumb_mc = container ["Cakethumb0"+i+"_mc"];

      Cakethumb_mc._x =(i-1) *Cakethumb_mc._width;

      Cakethumb_mc._y = (Stage.height-Cakethumb_mc.height)/2

      Cakethumb_mc.largerImage = i;

      Cakethumb_mc.onRelease = function() {

      _root.attachMovie ("Cakeimage0"+this.largerImage,"large_mc",2);

      large_mc._x = (Stage.width - large_mc._width)/2;

      large_mc._y = (Stage.height - large_mc. _height)/2;

      large_mc.onRelease = function() {

      this.removeMovieClip();

      }

      }

      }

      container.onEnterFrame = function () {

      this._x += Math.cos((-root._xmouse/Stage.width)*Math.PI)*15;

      if (this._x>0) {

      this._x = 0;

      if (-this._x>(this._width-Stage.width)) {

      this._x = -(this._width-Stage.width);

      }

      };

       

      I appreciate any help you guys can send my way.