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

Animate CC. html5 random popup

New Here ,
Jun 17, 2020 Jun 17, 2020

Hi, Im creating html5 banners with Animate CC. For this case my created banner has few buttons with links to land.

The problem is when you press button after the first rotation (like on 2nd or 3rd loop) it opens link and 2, 3 or more popups (automatically blocked by browser) depends on how many loops you watched. Have no idea why it stacks these popups instead of openning just 1 single web link at any time?...

397
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 , Jun 17, 2020 Jun 17, 2020

execute your listener once only.  don't repeat that code when your timeline replays:

 

this.prevent_replay;

 

if(!this.prevent_replay){

this.prevent_replay=true;

yournonrepeatinglistenerobjects.addEventListener(etc...)

}

Translate
Community Expert ,
Jun 17, 2020 Jun 17, 2020

execute your listener once only.  don't repeat that code when your timeline replays:

 

this.prevent_replay;

 

if(!this.prevent_replay){

this.prevent_replay=true;

yournonrepeatinglistenerobjects.addEventListener(etc...)

}

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
New Here ,
Jun 17, 2020 Jun 17, 2020

First thank you for responding. And second big thanks for your shared knowledge, was really stuck over here.

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 ,
Jun 18, 2020 Jun 18, 2020
LATEST

you're welcome.

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