如何在Nuxt项目中启动Adobe Edge动画?我尝试将我的js文件设置在静态页面中,并将此代码设置在插件文件夹中:
AdobeEdge.loadComposition('Sigurnost', 'EDGE-91375477', {
scaleToFit: "width",
centerStage: "horizontal",
minW: "0px",
maxW: "720px",
width: "720px",
height: "387px"
}, {dom: [ ]}, {dom: [ ]});
但是仍然无法正常工作。在我的控制台中写 ReferenceError:未定义AdobeEdge
我在nuxt config的script标签中设置了两个文件
script: [
{ src: '/Sigurnost_edge', body: true },
{ src: '/Sigurnost_edgeActions.js', body: true }
];
我的文件Sigurnost_edgeActions:
(function($, Edge, compId){
var Composition = Edge.Composition, Symbol = Edge.Symbol; // aliases for
commonly used Edge classes
//边缘符号:“ stage” (function(symbolName){
Symbol.bindTriggerAction(compId, symbolName, "Default Timeline",
3000, function(sym, e) {
sym.play("OscilacijaUpDown");
});
})("stage");
//Edge symbol end:'stage'
//Edge symbol: 'Symbol_1'
(function(symbolName) {
})("Symbol_1");
//Edge symbol end:'Symbol_1'
//Edge symbol: 'Linijice'
(function(symbolName) {
})("Linijice");
//Edge symbol end:'Linijice'
})(window.jQuery || AdobeEdge.$, AdobeEdge, "EDGE-91375477");
错误在设置“ AdobeEdge”的行中