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

Multiple HTML5 canvas on one page without Iframes

New Here ,
Feb 25, 2020 Feb 25, 2020

Copy link to clipboard

Copied

We have the need to have multiple canvases on one page, however the Animate HTML5/JS export always assumes there will always be only one canvas on the page ever.   I've read the previous solutions from years ago of using iframes, but that is just not an option for us.  

Seems like it would have be simple to include a namespace option for all the 'export-specific' js variables and functions in the Publish Settings, similar to custom namespaces for lib, createjs, and images.  Like instead of the main ID of 'canvas' could be 'canvasCustom1234' so there would be no conflicts.  Going through each exported html and renaming everything so they play nice with other exported code from Animate isn't a very good process - anyone find a way to get this to work without iframes?

Thanks

TOPICS
Code , Import and export , Publish package

Views

418

Translate

Translate

Report

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 25, 2020 Feb 25, 2020

Copy link to clipboard

Copied

Why are iframes not an option?

Votes

Translate

Translate

Report

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 ,
Feb 28, 2020 Feb 28, 2020

Copy link to clipboard

Copied

Site policy.  Do you have any alternatives?

Votes

Translate

Translate

Report

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
Contributor ,
Feb 29, 2020 Feb 29, 2020

Copy link to clipboard

Copied

You could maybe use iframes with a data-uri as source filled with javascript?

Votes

Translate

Translate

Report

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 29, 2020 Feb 29, 2020

Copy link to clipboard

Copied

LATEST

Use iframes anyway. How will anyone know unless they go manually snooping through your source code?

Votes

Translate

Translate

Report

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