Error: The canvas has been tainted by cross-origin data.

Community Beginner ,
Feb 25, 2020 Feb 25, 2020

Copy link to clipboard

Copied

When I publish my project I get this error when I open the HTML file.

Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The canvas has been tainted by cross-origin data.

 

 

TOPICS
Code , Error , Import and export , Other , Performance , Product issue

Views

2.4K

Likes

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

Copy link to clipboard

Copied

Did Animate try to warn you about this possibilty when you published the project? In the Output window?

Likes

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

Copy link to clipboard

Copied

- Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.

 

Bitmaps should change with button responses.

Likes

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

Copy link to clipboard

Copied

Well there you go. You have bitmaps in your buttons and they are in fact generating local security errors in your browser when run from the local file system.

Likes

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

Copy link to clipboard

Copied

ok

Likes

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 ,
Apr 08, 2021 Apr 08, 2021

Copy link to clipboard

Copied

What if I want images in my button?

Thank you.

Likes

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
Adobe Community Professional ,
Apr 08, 2021 Apr 08, 2021

Copy link to clipboard

Copied

If the image doesn't change, then just put an image behind a transparent button.

 

If you must have the images inside the buttons, then accept that it will only work when your project is loaded from a web server.

Likes

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 ,
Apr 08, 2021 Apr 08, 2021

Copy link to clipboard

Copied

Thank you so much!

 

Likes

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
Explorer ,
Apr 09, 2021 Apr 09, 2021

Copy link to clipboard

Copied

LATEST

You can also try explicitly defining the hit frame with a shape and a solid color.

Likes

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