Copy link to clipboard
Copied
I am an experienced Flash user since CS3, now using Adobe Animate CC. Intending HTML5 Canvas. I have built a banner ad for web with a transparent button on the top layer. It is clickable in the Hit frame. I have added a clicktag (below) to the <Head> in the HTML5 code, with my landing page url inserted. I am used to actionscript 2, which is now gone. I would like my animation to play 3 times and then stop, and when banner button is clicked it should go to my imbedded url landing page. How to do this without actionscript?
<meta charset="UTF-8">
<meta name="authoring-tool" content="Adobe_Animate_CC">
<title>Evolve_300x250_v5b</title>
<!-- write your code here -->
<script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
<script src="Evolve_300x250_v5b.js?1494597233374"></script>
<script type='text/javascript' src='https://ffrf.org/welcome/ark.html?utm_source=Patheos&utm_medium=Ad&utm_content=Evolve&utm_campaign=P...'></script>
<script>
you can use javascript and createjs:
in frame 1,
if(!this.var1){
this.var1=0;
}
in your last frame
this.var1++;
if(this.var1==3){
this.stop();
}
and for your button
this.button.addEventListener('click',clickF);
function clickF(){
window.open('http://www.whatever.com');
or window.location.href='http:...
}
Copy link to clipboard
Copied
you can use javascript and createjs:
in frame 1,
if(!this.var1){
this.var1=0;
}
in your last frame
this.var1++;
if(this.var1==3){
this.stop();
}
and for your button
this.button.addEventListener('click',clickF);
function clickF(){
window.open('http://www.whatever.com');
or window.location.href='http:...
}
Copy link to clipboard
Copied
How do I implement? I made an actions layer, adding the code bits to frame 1, the final frame (240) and the the button, using the actions panel to contain code. Banner won't play now.
Copy link to clipboard
Copied
Just... oh dear.
Copy link to clipboard
Copied
Being new to Animate CC and HTML5, how to implement this js code? I tried it as it would have worked in Actionscript 2, but no go.
Thank you!
Copy link to clipboard
Copied
use this:
this.button.addEventListener('click',clickF);
function clickF(){
window.open('http://www.whatever.com');
}