我试图将Edge生成的所有文件与我的主文件分开。
下面是它发布的文件中的html:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Untitled</title>
<!--Adobe Edge Runtime-->
<script type="text/javascript" charset="utf-8" src="anim_edgePreload.js"></script>
<style>
.edgeLoad-EDGE-20819118 { visibility:hidden; }
</style>
<!--Adobe Edge Runtime End-->
</head>
<body style="margin:0;padding:0;">
<div id="Stage" class="EDGE-20819118">
</div>
</body>
</html>我将代码复制到动画文件夹外的一个html文件中,其中包含所有生成的文件,并更改了它所引用的JS文件的目录。
anim_edgePreload.js --> edgeAnimation/anim_edgePreload.js
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>Untitled</title>
<!--Adobe Edge Runtime-->
<script type="text/javascript" charset="utf-8" src="edgeAnimation/anim_edgePreload.js"></script>
<style>
.edgeLoad-EDGE-20819118 { visibility:hidden; }
</style>
<!--Adobe Edge Runtime End-->
</head>
<body style="margin:0;padding:0;">
<div id="Stage" class="EDGE-20819118">
</div>
</body>
</html>动画不再出现在页面上,你知道为什么吗?
几秒钟后,我在Firebug中看到以下错误:
TypeError: AdobeEdge.okToLaunchComposition不是函数
function edgeCallback(a){htFallbacksa&&(a=htFallbacksa);AdobeEdge.preload.gota=!0;if(a==AdobeEdge.preload.last)AdobeEdge.okToLaunchComposition(compId),AdobeEdge.preload.busy=!1,AdobeEdge.preload.q.length>0&&(a=AdobeEdge.preload.q.pop(),AdobeEdge.requestResources(a.files,a.callback)(function edgeCallback(a){htFallbacksa&&(a=htFallbacksa);AdobeEdge.preload.gota=!0;if(a==AdobeEdge.preload.last)AdobeEdge.okToLaunchComposition(compId),AdobeEdge.preload.busy=!1,function AdobeEdge.requestResources(a.files,a.callback))}
发布于 2012-12-05 06:53:18
否决确实是不必要的,这是一个合理的问题,我已经有几天类似的问题了。考虑到如何新的边缘动画和每个构建的不同之处,缺乏信息。无论如何:
我的问题是在另一个页面上的div中显示动画。任何显式加载动画的尝试都失败了。我通过使用HTML object标记成功地解决了这个问题:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Banner</title>
</head>
<body style="margin:0;padding:0;">
<object data="animations/liferay/liferay-00.html" style="height:175px; width:100%"></object>
</body>
</html>请注意,我没有更改任何URL路径。我所做的就是指向发布文件夹。
因此,如果您仍然遇到问题,请尝试重新发布。
希望能有所帮助。
更新:由Wayne Barron提供的其他解决方案:http://youtu.be/RQKqlpCkrjs
https://stackoverflow.com/questions/13616478
复制相似问题