I am not able to replicate what was done in the tutorial. Below is my code. It appears as though the function is not being seen when I preview the animation. Please help!
- Brandon
<!DOCTYPE html>
<html>
<head data-gwd-animation-mode="quickMode">
<meta name="generator" content="Google Web Designer 1.0.3.0115">
<meta name="template" content="Banner 1.0.5">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
html, body {
width: 100%;
height: 100%;
margin: 0px;
}
.gwd-page-container {
position: relative;
width: 100%;
height: 100%;
}
.gwd-page-content {
background-color: transparent;
-webkit-transform: perspective(1400px) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
-webkit-transform-style: preserve-3d;
position: absolute;
}
.gwd-page-wrapper {
background-color: rgb(255, 255, 255);
position: absolute;
-webkit-transform: translateZ(0px);
}
.gwd-page-size {
width: 280px;
height: 200px;
}
.gwd-div-l1bx {
position: absolute;
width: 279px;
height: 600px;
background-image: -webkit-linear-gradient(90.56deg, rgb(255, 0, 0) 0%, rgb(0, 75, 255) 50%, rgb(255, 0, 0) 100%);
top: 0px;
left: 0px;
}
.gwd-gen-fknh .gwd-gen-gpzbgwdanimation {
-webkit-animation: gwd-gen-gpzbgwdanimation_animation 4s linear 0s infinite forwards;
}
@-webkit-keyframes gwd-gen-gpzbgwdanimation_animation {
0% {
-webkit-animation-timing-function: linear;
background-image: -webkit-linear-gradient(90.56deg, rgb(255, 0, 0) 0%, rgb(0, 75, 255) 50%, rgb(255, 0, 0) 100%);
top: 0px;
left: 0px;
}
100% {
-webkit-animation-timing-function: linear;
background-image: -webkit-linear-gradient(90.56deg, rgb(255, 0, 0) 0%, rgb(0, 75, 255) 50%, rgb(255, 0, 0) 100%);
top: -300px;
left: 0px;
}
}
.paused-anim {
-webkit-animation-play-state: paused;
}
</style>
<script type="text/x-serialization" id="gwd-serialization">
{
"version": 1,
"content": {
"type": "rad.ad.RichMedia",
"properties": {
"environment": "@environment"
},
"children": [
"@page1"
]
},
"objects": {
"environment": {
"type": "rad.environment.Browser",
"properties": {
"isBanner": true
}
},
"page1": {
"type": "rad.ui.Page",
"decorates": true,
"properties": {
"width": "280px",
"height": "200px",
"introAnimationSequence": "@intropage1"
},
"children": []
},
"intropage1": {
"type": "rad.animation.CSSAnimation",
"properties": {
"cssClass": "gwd-gen-fknh",
"elementCount": 1
}
}
}
}
</script>
<script>
function toggleAnimationState() {
document.getElementById('filmstrip').classList.toggle('paused-anim');
}
</script>
</head>
<body>
<div class="gwd-page-container">
<div id="page1" class="gwd-page-wrapper gwd-page-size" data-gwd-component-id="page1">
<div class="gwd-page-content gwd-page-size">
<div class="gwd-div-l1bx gwd-gen-gpzbgwdanimation paused-anim" id="filmstrip" onclick="toggleAnimationState();"></div>
</div>
</div>
</div>
</body>
</html>
Thank you for your reply. I made the change you suggested above and it still does not work. I removed the "paused-anim" piece from the div class so the animation would run until it is clicked on and it does not stop. Again, here is my code, thanks again for your help! - Brandon
<!DOCTYPE html>
<html>
<head data-gwd-animation-mode="proMode">
.gwd-div-ggl5 {
position: absolute;
background-image: none;
background-color: rgba(250, 255, 0, 0.298039);
top: 0px;
left: 0px;
width: 280px;
height: 400px;
}
.gwd-div-yp94 {
position: absolute;
width: 274px;
height: 50px;
background-image: none;
background-color: rgb(255, 0, 0);
left: 2.9999999999999716px;
top: 0px;
}
.gwd-div-9d89 {
width: 274px;
top: 54px;
background-image: none;
background-color: rgb(128, 255, 0);
}
.gwd-div-pzp8 {
width: 274px;
top: 108px;
background-image: none;
background-color: rgb(0, 0, 255);
}
.gwd-div-a48a {
width: 274px;
top: 162px;
background-image: none;
background-color: rgb(255, 0, 238);
}
.gwd-div-fj0i {
width: 274px;
top: 216px;
background-image: none;
background-color: rgb(255, 132, 0);
}
.gwd-div-p52f {
width: 274px;
top: 270px;
}
.gwd-div-wd2b {
width: 274px;
top: 324px;
}
.gwd-div-4ox9 {
width: 274px;
top: 378px;
}
.gwd-div-r6q1 {
width: 274px;
top: 432px;
}
.gwd-div-5660 {
height: 200px;
}
.gwd-div-f5f1 {
height: 200px;
}
.gwd-gen-1zru .gwd-gen-kjahgwdanimation {
-webkit-animation: gwd-gen-kjahgwdanimation_gwd-keyframes 7s linear 0s infinite forwards;
}
@-webkit-keyframes gwd-gen-kjahgwdanimation_gwd-keyframes {
0% {
top: 0px;
left: 0px;
width: 280px;
height: 400px;
-webkit-animation-timing-function: linear;
}
100% {
top: -270px;
left: 0px;
width: 280px;
height: 400px;
-webkit-animation-timing-function: linear;
}
}
#filmstrip.paused-anim {
-webkit-animation-play-state: paused;
}
</style>
<script>
function toggleAnimationState() {
document.getElementByID('filmstrip').classList.toggle('paused-anim');
}
</script>
"cssClass": "gwd-gen-1zru",
"elementCount": 1
}
}
}
}
</script>
</head>
<body>
<div class="gwd-page-container">
<div id="page1" class="gwd-page-wrapper gwd-page-size gwd-div-f5f1" data-gwd-component-id="page1">
<div class="gwd-page-content gwd-page-size gwd-div-5660">
<div class="gwd-div-ggl5 gwd-gen-kjahgwdanimation" id="filmstrip" onclick="toggleAnimationState();">
<div class="gwd-div-yp94" id="test1"></div>
<div class="gwd-div-yp94 gwd-div-p52f" id="test6"></div>
<div class="gwd-div-yp94 gwd-div-9d89" id="test2"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-wd2b" id="test7"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-pzp8" id="test3"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-pzp8 gwd-div-4ox9" id="test8"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-pzp8 gwd-div-a48a" id="test4"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-pzp8 gwd-div-a48a gwd-div-r6q1" id="test9"></div>
<div class="gwd-div-yp94 gwd-div-9d89 gwd-div-pzp8 gwd-div-a48a gwd-div-fj0i" id="test5"></div>
getElementByID
getElementById
Keep up the good work with GWD! I am in the process of switching all of my companies Flash ads over to HTML5 with the help of GWD. It is the perfect tool for Flash designers that want to continue to develop on a timeline platform.