Edge Animate 中的大括号不匹配

Posted

技术标签:

【中文标题】Edge Animate 中的大括号不匹配【英文标题】:Mismatched braces in Edge Animate 【发布时间】:2017-04-05 05:05:11 【问题描述】:

我在 Animate 中的代码出了点问题。确切的错误是文档末尾的“大括号不匹配”,第 882 行,)(window.jQuery || Adob​​eEdge.$, Adob​​eEdge, "EDGE-3775642");

我该如何解决这个问题?我明白了,问题出在未闭合的括号上,但是我怎样才能找到它呢?

/***********************
* Adobe Edge Animate Composition Actions
*
* Edit this file with caution, being careful to preserve 
* function signatures and comments starting with 'Edge' to maintain the 
* ability to interact with these actions from within Adobe Edge Animate
*
***********************/
(function($, Edge, compId)
var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for commonly used Edge classes

   //Edge symbol: 'stage'
   (function(symbolName) 
      
      
      

      

      Symbol.bindElementAction(compId, symbolName, "$button1", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button1").play();
         
         sym.getSymbol("line1").play();
         // Show an element 
         sym.$("line1").show();
         sym.getSymbol("cont1").play();
         
         // Show an element 
         sym.$("cont1").show();
         
         
         
         
         
         
         
         // Hide an element 
         sym.$("Text9").hide();

      );
      //Edge binding endSymbol.bindElementAction(compId, symbolName, "$button1", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         
         sym.getSymbol("line1").stop();
         
         sym.getSymbol("line1").stop();
         
         // Hide an element 
         
         // Hide an element 
         sym.$("line1").hide();
         
         
         
         
         // Hide an element 
         sym.$("cont1").hide();
         setTimeout(delay, 1500);
         

      );
      //Edge binding end

      

      Symbol.bindElementAction(compId, symbolName, "$bitton2", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("bitton2").getSymbol("button15Copy").play();
         
         
         
         sym.getSymbol("line2").play();
         
         // Show an element 
         sym.$("line2").show();
         
         
         
         sym.getSymbol("cont2").play();
         
         // Show an element 
         sym.$("cont2").show();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button3", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button3").getSymbol("button15Copy2").play();
         
         sym.getSymbol("line3").play();
         sym.getSymbol("cont3").play();
         
         // Show an element 
         sym.$("cont3").show();
         
         
         // Show an element 
         sym.$("line3").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button4", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("cont4").play();
         
         // Hide an element 
         sym.$("cont4").hide();
         
         // Show an element 
         sym.$("cont4").show();
         
         sym.getSymbol("button4").getSymbol("button15Copy3").play();
         
         sym.getSymbol("line4").play();
         
         // Show an element 
         sym.$("line4").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button5", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("cont5").play();
         
         
         
         // Show an element 
         sym.$("cont5").show();
         
         sym.getSymbol("button5").getSymbol("button15Copy4").play();
         
         sym.getSymbol("line5").play();
         
         // Show an element 
         sym.$("line5").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button6", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button6").getSymbol("button15Copy5").play();
         
         sym.getSymbol("line6").play();
         sym.getSymbol("cont6").play();
          
          // Show an element 
          sym.$("cont6").show();
          
         
         // Show an element 
         sym.$("line6").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button7", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button7").getSymbol("button15Copy6").play();
         
         sym.getSymbol("line7").play();
         // Show an element 
         sym.$("cont7").show();
         
         sym.getSymbol("cont7").play();
         
         
         // Show an element 
         sym.$("line7").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button8", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("cont8").play();
         
         // Show an element 
         sym.$("cont8").show();
         
         sym.getSymbol("button8").getSymbol("button15Copy7").play();
         
         sym.getSymbol("line8").play();
         
         
         // Show an element 
         sym.$("line8").show();
         
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button9", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("cont9").play();
         
         // Show an element 
         sym.$("cont9").show();
         
         sym.getSymbol("button9").getSymbol("button15Copy8").play();
         
         sym.getSymbol("line9").play();
         
         // Show an element 
         sym.$("line9").show();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button10", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("cont10").play();
         
         // Hide an element 
         
         // Show an element 
         sym.$("cont10").show();
         
         
         sym.getSymbol("button10").getSymbol("button15Copy10").play();
         
         sym.getSymbol("line10").play();
         
         // Show an element 
         sym.$("line10").show();
         

      );
      //Edge binding end

      Symbol.bindTriggerAction(compId, symbolName, "Default Timeline", 0, function(sym, e) 
         // insert code here
         
         
         
         
         sym.getSymbol("line1").stop();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$line1", "mouseleave", function(sym, e) 
         
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$line1", "mouseout", function(sym, e) 
         
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$bitton2", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("line2").stop();
         
         // Hide an element 
         sym.$("line2").hide();
         
         
         sym.getSymbol("cont2").stop();
         
         // Hide an element 
         sym.$("cont2").hide();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button3", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("line3").stop();
         
         // Hide an element 
         sym.$("line3").hide();
         
         sym.getSymbol("cont3").stop();
         
         // Hide an element 
         sym.$("cont3").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button4", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("cont4").stop();
         
         // Hide an element 
         sym.$("cont4").hide();
         
         sym.getSymbol("line4").stop();
         // Hide an element 
         sym.$("line4").hide();
         
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button5", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("cont5").stop();
         
         // Hide an element 
         sym.$("cont5").hide();
         
         sym.getSymbol("line5").stop();
         
         // Hide an element 
         sym.$("line5").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button6", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("line6").stop();
         
         // Hide an element 
         // Hide an element 
         sym.$("cont6").hide();
         
         sym.$("line6").hide();
         
         sym.getSymbol("cont6").stop();
         
         // Show an element 
         
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button7", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("line7").stop();
         
         // Hide an element 
         sym.$("line7").hide();
         
         sym.getSymbol("cont7").stop();
         
         // Hide an element 
         sym.$("cont7").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button8", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("cont8").stop();
         
         // Hide an element 
         sym.$("cont8").hide();
         
         sym.getSymbol("line8").stop();
         
         // Hide an element 
         sym.$("line8").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button9", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("cont9").stop();
         
         // Hide an element 
         sym.$("cont9").hide();
         
         sym.getSymbol("line9").stop();
         
         // Hide an element 
         sym.$("line9").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button10", "mouseout", function(sym, e) 
         // insert code to be run when the mouse is moved off the object
         sym.getSymbol("cont10").stop();
         
         // Hide an element 
         sym.$("cont10").hide();
         
         sym.getSymbol("line10").play();
         
         // Hide an element 
         sym.$("line10").hide();
         

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$Stage", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         
      );
      //Edge binding end

   )("stage");
   //Edge symbol end:'stage'

   //=========================================================
   
   //Edge symbol: 'Button1'
   (function(symbolName)    
   
   )("Button1");
   //Edge symbol end:'Button1'

   //=========================================================
   
   //Edge symbol: 'button1'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$buttons", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         
      );
      //Edge binding end

   )("button1");
   //Edge symbol end:'button1'

   //=========================================================
   
   //Edge symbol: 'caontainer1'
   (function(symbolName)    
   
   )("caontainer1");
   //Edge symbol end:'caontainer1'

   //=========================================================
   
   //Edge symbol: 'bitton2'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("bitton2");
   //Edge symbol end:'bitton2'

   //=========================================================
   
   //Edge symbol: 'button3'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy2", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy2", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button3");
   //Edge symbol end:'button3'

   //=========================================================
   
   //Edge symbol: 'button4'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy3", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy3", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button4");
   //Edge symbol end:'button4'

   //=========================================================
   
   //Edge symbol: 'button5'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy4", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy4", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button5");
   //Edge symbol end:'button5'

   //=========================================================
   
   //Edge symbol: 'button6'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy5", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy5", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button6");
   //Edge symbol end:'button6'

   //=========================================================
   
   //Edge symbol: 'button7'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy6", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy6", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button7");
   //Edge symbol end:'button7'

   //=========================================================
   
   //Edge symbol: 'button8'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy7", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy7", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button8");
   //Edge symbol end:'button8'

   //=========================================================
   
   //Edge symbol: 'button9'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy8", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy8", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button9");
   //Edge symbol end:'button9'

   //=========================================================
   
   //Edge symbol: 'button10'
   (function(symbolName)    
   
      Symbol.bindElementAction(compId, symbolName, "$button15Copy10", "mouseover", function(sym, e) 
         // insert code to be run when the mouse hovers over the object
         sym.getSymbol("button15").play();
         
         
         // Show an element 
         sym.getSymbol("caontainer1").$("cont1").show();
         
         sym.getSymbol("caontainer1").play();

      );
      //Edge binding end

      Symbol.bindElementAction(compId, symbolName, "$button15Copy10", "mouseleave", function(sym, e) 
         // insert code to be run when the mouse leaves an element
         sym.getSymbol("caontainer1").stop();
         

      );
      //Edge binding end

   )("button10");
   //Edge symbol end:'button10'

   //=========================================================
   
   //Edge symbol: 'lines'
   (function(symbolName)    
   
   )("lines");
   //Edge symbol end:'lines'

   //=========================================================
   
   //Edge symbol: 'line1'
   (function(symbolName)    
   
   )("line1");
   //Edge symbol end:'line1'

   //=========================================================
   
   //Edge symbol: 'line2'
   (function(symbolName)    
   
   )("line2");
   //Edge symbol end:'line2'

   //=========================================================
   
   //Edge symbol: 'line3'
   (function(symbolName)    
   
   )("line3");
   //Edge symbol end:'line3'

   //=========================================================
   
   //Edge symbol: 'line'
   (function(symbolName)    
   
   )("line");
   //Edge symbol end:'line'

   //=========================================================
   
   //Edge symbol: 'line5'
   (function(symbolName)    
   
   )("line5");
   //Edge symbol end:'line5'

   //=========================================================
   
   //Edge symbol: 'line6'
   (function(symbolName)    
   
   )("line6");
   //Edge symbol end:'line6'

   //=========================================================
   
   //Edge symbol: 'line7'
   (function(symbolName)    
   
   )("line7");
   //Edge symbol end:'line7'

   //=========================================================
   
   //Edge symbol: 'line8'
   (function(symbolName)    
   
   )("line8");
   //Edge symbol end:'line8'

   //=========================================================
   
   //Edge symbol: 'line9'
   (function(symbolName)    
   
   )("line9");
   //Edge symbol end:'line9'

   //=========================================================
   
   //Edge symbol: 'line10'
   (function(symbolName)    
   
   )("line10");
   //Edge symbol end:'line10'

   //=========================================================
   
   //Edge symbol: 'cont1'
   (function(symbolName)    
   
   )("cont1");
   //Edge symbol end:'cont1'

   //=========================================================
   
   //Edge symbol: 'cont2'
   (function(symbolName)    
   
   )("cont2");
   //Edge symbol end:'cont2'

   //=========================================================
   
   //Edge symbol: 'cont3'
   (function(symbolName)    
   
   )("cont3");
   //Edge symbol end:'cont3'

   //=========================================================
   
   //Edge symbol: 'cont4'
   (function(symbolName)    
   
   )("cont4");
   //Edge symbol end:'cont4'

   //=========================================================
   
   //Edge symbol: 'cont5'
   (function(symbolName)    
   
   )("cont5");
   //Edge symbol end:'cont5'

   //=========================================================
   
   //Edge symbol: 'cont6'
   (function(symbolName)    
   
   )("cont6");
   //Edge symbol end:'cont6'

   //=========================================================
   
   //Edge symbol: 'cont7'
   (function(symbolName)    
   
   )("cont7");
   //Edge symbol end:'cont7'

   //=========================================================
   
   //Edge symbol: 'cont8'
   (function(symbolName)    
   
   )("cont8");
   //Edge symbol end:'cont8'

   //=========================================================
   
   //Edge symbol: 'cont9'
   (function(symbolName)    
   
   )("cont9");
   //Edge symbol end:'cont9'

   //=========================================================
   
   //Edge symbol: 'cont10'
   (function(symbolName)    
   
   )("cont10");
   //Edge symbol end:'cont10'

)(window.jQuery || AdobeEdge.$, AdobeEdge, "EDGE-3775642");

【问题讨论】:

【参考方案1】:

问题出在这一行:

//Edge binding endSymbol.bindElementAction(compId, symbolName, "$button1", "mouseleave", function(sym, e) 

endSymbol.bindElementAction 应该在新行上,因此它会启动另一个函数调用,而不是注释的一部分。所以它应该是这样的:

//Edge binding 
endSymbol.bindElementAction(compId, symbolName, "$button1", "mouseleave", function(sym, e) 

【讨论】:

上帝保佑你,巴马尔

以上是关于Edge Animate 中的大括号不匹配的主要内容,如果未能解决你的问题,请参考以下文章

在 Vim 中自动插入匹配的大括号

排列组合中的大括号怎么算

`var ... = ...` 语句中的大括号有啥作用?

Node.js 'require' 语句中的大括号(大括号)

emacs 大括号间移动

html中的大括号和百分号是啥意思?