Skip to main content
Participating Frequently
May 12, 2017
Answered

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

  • May 12, 2017
  • 1 reply
  • 2498 views

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=Patheos+Summer+2017'></script>

<script>

    This topic has been closed for replies.
    Correct answer kglad

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

    }

    1 reply

    kglad
    Community Expert
    kgladCommunity ExpertCorrect answer
    Community Expert
    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:...

    }

    rogerd61Author
    Participating Frequently
    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.

    Legend
    May 12, 2017

    Just... oh dear.