0 Replies Latest reply on Jul 25, 2014 5:28 AM by todd_rohrer

    Actionscript gets deleted on publish (or move)?

    todd_rohrer Level 1

      Increasingly in the last few weeks, I've experienced a weird issue where I save or publish a copy of a file I'm working on, and then seemingly random bits of my actionscript are deleted.

       

      For example, on my original save, my Actions looked like this:

       

       

      // ========== INIT ===========//

       

      //Load the client's logo

      mcLogo.loadMovie(_global.dplocal.customizedDataPath + "logo_large.swf");

       

       

      //Show debug Version info if we're running in standalone mode...

      if(_parent == undefined) {

          mcVersionInfo._visible = true;

      } else {

          mcVersionInfo._visible = false;

      }

       

      /*

      *          Retrieve the customized data path, and remove any leading navigation characters.

      *          Next, check if the video is a custom video (its contentPath is not the default

      *          thank you video), that it has not been corrected yet, and that this SWF was opened

      *          by another SWF; if all are true, then add the folder name to the beginning of the

      *          content path.

      */

      var customFolder = _global.dplocal.customizedDataPath;

      while(customFolder.StartsWith(".") || customFolder.StartsWith("\\") || customFolder.StartsWith("/"))

      {

                  customFolder = customFolder.slice(1);

      }

       

      var debugMessage = "\r##### Forms Complete / Thank-You Video - Start #####" +

                                                         "\r#  customizedDataPath:  " + _global.dplocal.customizedDataPath +

                                                         "\r#  customFolder:  " + customFolder +

                                                         "\r#  contentPath (before):  " + mcPlayer.contentPath;

      if(mcPlayer.contentPath != "thank_you2.flv" && !mcPlayer.contentPath.StartsWith(customFolder) && _parent != undefined)

      {

                  mcPlayer.contentPath = customFolder + mcPlayer.contentPath;

      }

      debugMessage += "\r#  contentPath (after):  " + mcPlayer.contentPath +

                                                      "\r#####  Forms Complete / Thank-You Video - End  #####";

       

      debug(debugMessage);

       

      but after saving or publishing (I'm not sure which is the issue), it got cut down to this:

       

       

      // ========== INIT ===========//

       

      //Load the client's logo

      mcLogo.loadMovie(_global.dplocal.customizedDataPath + "logo_large.swf");

       

       

      //Show debug Version info if we're running in standalone mode...

      if(_parent == undefined) {

          mcVersionInfo._visible = true;

      } else {

          mcVersionInfo._visible = false;

      }

       

      /*

      *          Retrieve the customized data path, and remove any leading navigation characters.

      *          Next, check if the video is a custom video (its contentPath is not the default

      *          thank you video), that it has not been corrected yet, and that this SWF was opened

      *   

      I didn't touch the actions during my edit.  Sometimes it removes a large amount of code like that, other times it seemed to be only a line or two.

       

      Is there a reason why this gets removed?  Is there something I could do to prevent it?