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

BANNER

New Here ,
Feb 14, 2018 Feb 14, 2018

Hello, I made a banner but when I click many pages are opened, one for each time the banner starts! why? why?

TOPICS
ActionScript
237
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 ,
Feb 14, 2018 Feb 14, 2018

show your relevant code.

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 ,
Feb 14, 2018 Feb 14, 2018
LATEST

It's quite likely that you're adding the click listener again every times the animation starts. Either loop the animation back to the frame after your listener is added, or first check to see if the listener exists:

if(!this.mybutton.hadEventListener("click",clicked)) this.mybutton.addEventListener("click",clicked);

Or something like that.

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