Skip to main content
Participating Frequently
April 26, 2018
Answered

movie initiated after 3 second rollover

  • April 26, 2018
  • 1 reply
  • 423 views

Hello,

I am building an HTML5 interstitial banner. The animation is paused on load and only initiated after a 3 second rollover of the banner

I am using Animated CC with Canvas.

Currently I am using this ActionScript, which seems to be working except for the part about the 3 second pause.

this.interstitial.addEventListener("rollover", fl_ClickToGoToAndPlayFromFrame_2.bind(this));

function fl_ClickToGoToAndPlayFromFrame_2()

{

  this.gotoAndPlay(3);

}

Can someone help me to add the 3 second pause on the rollover/Mouseover.

Many thanks for any help on this!

Gg

    This topic has been closed for replies.
    Correct answer kglad

    yes, use a ticker (or just add static frames at the start of your timeline).

    1 reply

    kglad
    Community Expert
    Community Expert
    April 27, 2018

    do you have to maintain the mouseover for 3 seconds?  or delay the goto for 3 seconds after a rollover?  or something else?

    Participating Frequently
    April 27, 2018

    Hi Kglad!

    Thanks for reply... I need to maintain the mouseover for 3 seconds -- after those 3 sec the animation begins to play.

    Also, Is there a way to set it so that this delay/restart only happens when the banner first loads? I now see that the script I use above restarts the banner every time I rollover the banner. I only need that 3 second rollover pause/start on the first time the banner appears.

    Thanks again for any help with this!

    gg

    kglad
    Community Expert
    Community Expert
    May 11, 2018

    @kglad

    Hi Kglad, Thanks for your response! That worked, I wet with the static frames bc I wasn't sure about how to implement the ticker, but it worked just like I needed. Thanks again for taking the time to explain!


    you're welcome.