我已禁用Edge Animate Composition中的autoplay-option。 现在我想用waypoints.js绑定这些动画,所以我需要通过javascript调用动画。
这是我的HTML
<div id="StageTwo" class="EDGE-4436041"></div>
这是Javascript
<script>
AdobeEdge.loadComposition('animation_bereitstellung', 'EDGE-4436041', {
scaleToFit: "both",
bScaleToParent: "true",
centerStage: "horizontal",
minW: "0px",
maxW: "undefined",
width: "650px",
height: "463px"
}, {"dom":{}}, {"style":{"${symbolSelector}":{"isStage":"true","rect":["undefined","undefined","500px","356px"],"fill":["rgba(255,255,255,1)"]}},"dom":{}});
</script>
问题:我在一个网站上有多个动画。
答案 0 :(得分:0)
我认为最简单的方法是使用bootstrapCallback以类似于以下的方式调用Adobe Edge API:
var waypoint = new Waypoint({
element: document.getElementById('basic-waypoint'),
handler: function() {
window.AdobeEdge.bootstrapCallback(function(compId) {
var comp = AdobeEdge.getComposition("EDGE-4436041");
//either to play the stage
var stage = comp.getStage().play();
//or to play a symbol inside the stage
var mySymbol = comp.getStage().getSymbol("symbol");
mySymbol.play();
});
}
});
希望有所帮助!