How to add two same adobe edge animation in single html page?

南笙酒味 提交于 2019-12-03 08:54:44

I followed this tutorial and it works. http://blogs.adobe.com/edge/2012/05/15/bootstrapping-edge-compositions/

It uses plain javascript to show/hide the right composition. All the magic is beacause of the callback: AdobeEdge.bootstrapCallback(function (compId) { //your function will be called when the composition is ready to play });

As stated in the comment this callback will be called when the composition is ready. I did a working example that changes the composition on button click.

Have you tried applying it to both of the ids present:

<script type="text/javascript">
    $(document).ready(function(){
    jQuery('[data-url="10.htm"]').live('pageshow', function(){

        if($ && $.Edge && $.Edge.symbol.get($("Stage"))){
            $('#Stage, #Stage > div').show();
            $.Edge.symbol.get($("#Stage")).play(0);

        }
    });

    jQuery('[data-url="11.htm"]').live('pageshow', function(){

        if($ && $.Edge && $.Edge.symbol.get($("Stage2"))){
            $('#Stage2, #Stage2 > div').show();
            $.Edge.symbol.get($("#Stage2")).play(0);

        }
    });
});

</script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!