最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Why doesn't Adobe Edge animation work after copying generated code into an html file in a different directo

programmeradmin0浏览0评论

I'm trying to keep all the files Edge generates separate from my main files.

This is the html in the file it publishes:

<!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>

I copied the code over to an html file outside the animation folder containing all the generated files and changed the directory of the JS file it's referring to.

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>

The animation no longer appears on the page, any idea why?

I get this error in Firebug after a few seconds:

TypeError: AdobeEdge.okToLaunchComposition is not a function

function edgeCallback(a){htFallbacks[a]&&(a=htFallbacks[a]);AdobeEdge.preload.got[a]=!0;if(a==AdobeEdge.preload.last)AdobeEdge.okToLaunchComposition(pId),AdobeEdge.preload.busy=!1,AdobeEdge.preload.q.length>0&&(a=AdobeEdge.preload.q.pop(),AdobeEdge.requestResources(a.files,a.callback))}

I'm trying to keep all the files Edge generates separate from my main files.

This is the html in the file it publishes:

<!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>

I copied the code over to an html file outside the animation folder containing all the generated files and changed the directory of the JS file it's referring to.

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>

The animation no longer appears on the page, any idea why?

I get this error in Firebug after a few seconds:

TypeError: AdobeEdge.okToLaunchComposition is not a function

function edgeCallback(a){htFallbacks[a]&&(a=htFallbacks[a]);AdobeEdge.preload.got[a]=!0;if(a==AdobeEdge.preload.last)AdobeEdge.okToLaunchComposition(pId),AdobeEdge.preload.busy=!1,AdobeEdge.preload.q.length>0&&(a=AdobeEdge.preload.q.pop(),AdobeEdge.requestResources(a.files,a.callback))}

Share Improve this question edited Nov 29, 2012 at 18:28 Charles 51.4k13 gold badges106 silver badges144 bronze badges asked Nov 28, 2012 at 23:48 Orb HitterOrb Hitter 3171 gold badge4 silver badges9 bronze badges 2
  • 1 Instead of voting my question down, how about telling me why my question isn't good? At least then I could change the way I think about my approach. – Orb Hitter Commented Nov 29, 2012 at 16:37
  • 1 For this kind of issue, please view the video here. This video will demonstrate what you need to do, in order to have your files Located in SubFolders. youtu.be/RQKqlpCkrjs And this s a valid question. good luck Wayne – Wayne Barron Commented Feb 1, 2013 at 2:33
Add a ment  | 

1 Answer 1

Reset to default 7

My issue was displaying the animation in a div on another page. Any attempt to load the animation explicitly failed. I succeeded in resolving this issue by using the HTML object tag:

<!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>

Do note I did NOT change any of my URL paths. All I did was point to the publish folder.

So if you still encounter issues try re-publishing.

Update: Additional solution provided by Wayne Barron: http://youtu.be/RQKqlpCkrjs

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论