Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Animate CC - how to control looping and linking to landing pages in HTML5?

Community Beginner ,
May 12, 2017 May 12, 2017

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>

2.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 12, 2017 May 12, 2017

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:...

}

Translate
Community Expert ,
May 12, 2017 May 12, 2017

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:...

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 12, 2017 May 12, 2017

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.

Screen Shot 2017-05-12 at 11.44.14 AM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 12, 2017 May 12, 2017

Just... oh dear.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 12, 2017 May 12, 2017

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 12, 2017 May 12, 2017
LATEST

use this:

this.button.addEventListener('click',clickF);

function clickF(){

window.open('http://www.whatever.com');

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines