Highlighted

Canvas colour: Action code on a html5 canvas

New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Hi there. I am working on a simple page by page story book in AA. It is a html canvas. 

 

On each page, i can change the page colour (outside of canvas) with this code. 

 

document.body.style

.backgroundColor = "your color";

 

Prob a super simple question but what is the action code for just changing the white canvas colour to something else? (without the need to draw a rectangle to fill the canvas). ? Thanks. Craig.

 

TOPICS
ActionScript, Timeline

Views

58

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

Canvas colour: Action code on a html5 canvas

New Here ,
Jan 14, 2020

Copy link to clipboard

Copied

Hi there. I am working on a simple page by page story book in AA. It is a html canvas. 

 

On each page, i can change the page colour (outside of canvas) with this code. 

 

document.body.style

.backgroundColor = "your color";

 

Prob a super simple question but what is the action code for just changing the white canvas colour to something else? (without the need to draw a rectangle to fill the canvas). ? Thanks. Craig.

 

TOPICS
ActionScript, Timeline

Views

59

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
Jan 14, 2020 0
Lydecker LATEST
New Here ,
Jan 15, 2020

Copy link to clipboard

Copied

document.getElementById("canvas").style.backgroundColor = '#000000'

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
Reply
Loading...
Jan 15, 2020 0