如何增加在单个HTML页面同结构的Adobe边缘的动画? [英] How to add two same adobe edge animation in single html page?

查看:232
本文介绍了如何增加在单个HTML页面同结构的Adobe边缘的动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用jQuery Mobile的,不同的网页内容也将在一个HTML页面。

I am using jquery mobile where different pages contents will be in one html page.

在页面上的变化(滑动页面),其他页面具有相同的优势动画,因为所有的HTML内容将设在一个HTML页面中,只有第一条边动画将工作,其余的将无法正常工作。

On page change(sliding page), other pages have same edge animates, because of all html contents will be located in single html page, only first edge animate will work, rest will not work.

我有两个阶段的id

<div id="Stage" class="spring_animation"></div>

<div id="Stage2" class="spring_animation"></div>

下面用一个阶段code(&LT; D​​IV ID =舞台)的边缘动画工作...

Below code used for one stage(<div id="Stage") edge animate to work...

<!--Adobe Edge Runtime-->
<script type="text/javascript" charset="utf-8" src="spring_edgePreload.js"></script>
<!--Adobe Edge Runtime End-->

<script type="text/javascript">
 jQuery(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); 
        }

    });   
 });       
</script>

但是,它不工作。

But, it doesn't works.

请问有人在社区,请帮我解决这个问题?

Will anyone in community please help me solve this issue?

我认为,问题是依靠与土坯边缘动画和它的 API

I think, problem is relies with adobe edge animate and its API.

推荐答案

我跟着这个教程和它的作品。 http://blogs.adobe.com/edge/2012/ 5月15日/引导边缘的组合物/

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

它使用纯JavaScript来显示/隐藏权组成。 所有的魔法是东阳回调: AdobeEdge.bootstrapCallback(函数(compId){ //当该组合物是准备玩你的函数会被调用 });

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.

这篇关于如何增加在单个HTML页面同结构的Adobe边缘的动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆