
Copy link to clipboard
Copied
I have a picture in html canvas.
I want to change the opacity when I click on it.....
which js code set the opacity?
[Moved from the non-specific Coding Corner to a product-specific support forum - moderator]
[Although, this possibly might be Edge Animate and not Animate, so please say something if it's in the wrong spot - same moderator]
1 Correct answer
Attempting to apply CSS styles to CreateJS canvas objects does nothing.
The correct property to set is alpha.
Copy link to clipboard
Copied
You could use something like...
onclick="getElementById('yourimageid').style.opacity = .5"
...to change the css style when it's clicked.
Copy link to clipboard
Copied
Attempting to apply CSS styles to CreateJS canvas objects does nothing.
The correct property to set is alpha.

