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

How to define opacity in Animate CC Html canvas with coding?

Guest
Dec 04, 2016 Dec 04, 2016

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]

Views

3.4K

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

correct answers 1 Correct answer

LEGEND , Feb 11, 2017 Feb 11, 2017

Attempting to apply CSS styles to CreateJS canvas objects does nothing.

The correct property to set is alpha.

Votes

Translate

Translate
Community Expert ,
Dec 05, 2016 Dec 05, 2016

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.

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 11, 2017 Feb 11, 2017

Copy link to clipboard

Copied

LATEST

Attempting to apply CSS styles to CreateJS canvas objects does nothing.

The correct property to set is alpha.

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