Your one-stop web everything MJPage Design

MJPage Design

How to Repair Edge Animate Corrupted Files



During my involvement on the Edge Animate forum, I have encountered desperate users who could not open their files anymore for various reasons. There are several ways I have tried to help them. Sometimes it is just a matter of reading the action.js file to find where a closure is missing. Other times, it is difficult to find the reason why a file is suddenly not working.

Stop here and do not despair. For some of you, depending on the problem, there might be a way to recover your files--especially if you have a published version--but the fix works also on development files.

In this tutorial, I will show you how to fix your files and save the day.


You still have the development folder.

  1. Make a copy of your original folder so you have a backup of your files in case this procedure fails. When it fails you can make another copy and try this procedure again in case you missed something.
  2. Create a new folder
  3. Create a new file and save it with the same name as the problematic file
  4. If you have an 'images' folder, copy it in the new folder.
  5. Copy the actions.js and edge.js files from the corrupted folder.
  6. Paste the edge.js and action.js files into the new folder and click yes to override the files
  7. Open the original and the new html files in a text editor. Copy the Edge ID number from original file and paste the ID number in the new file. The ID should be in 3 places (see yellow highlight below). Replace them all. Note: Do not copy-paste any extra script from the original file as it may have been the source of the problem in the first place.
  8. WARNING WARNING WARNING WARNING WARNING

    Do not overwrite the .an file as this is the framework that will allow the files to be repaired.


You have only the web published files

  1. It is important to notice that when you publish files, the development main file (.an) is not included in the publish folder and you have only the action and the edge files.
  2. Proceed the same way as above. The .an file in the newly created folder will allow you to open your files in the development mode as usual.

  3. You only have a deployment package

    1. An OAM file is actually an archive file. You can open it the same way you would a zipped file with archiving software like Winzip or Winrar, and unzip it in a folder.
    2. In the html, remove the OAM script including the script tags. It should look something like this:
      
          < s cript >
          var custHtmlRoot=""; 
      	var script = document.createElement('script'); 
      	script.type= "text/javascript";
      script.src = custHtmlRoot+"edge_includes/edge.5.0.1.min.js";
      	var head = document.getElementsByTagName('head')[0], done=false;
      	script.onload = script.onreadystatechange = function(){
      		if (!done && (!this.readyState || this.readyState == 'loaded' || this.readyState == 'complete')) {
      			done=true;
      			var opts ={
          scaleToFit: "none",
          centerStage: "none",
          minW: "0",
          maxW: "undefined",
          width: "1000px",
          height: "400px"
      };
      			opts.htmlRoot =custHtmlRoot;
      			AdobeEdge.loadComposition('hello', 'EDGE-9716415', opts,
      			{"dom":{}}, {"dom":{}});		
      			script.onload = script.onreadystatechange = null;
      			head.removeChild(script);
      		}
      	};
      	head.appendChild(script);
      
          
    3. Now follow steps 1 through 7 from the first example above
    4. That's all you need to do. Open your new file in Animate and you should be back to normal

      I have helped several users with this simple fix and believe me, they were happy!