• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
  • ボタンを繰り返し押すと半透明が濃くなる。どうすれば半透明を維持できますか?ご教授お願いします。
0

ボタンを繰り返し押すと半透明が濃くなる。どうすれば半透明を維持できますか?ご教授お願いします。

New Here ,
May 18, 2020 May 18, 2020

Copy link to clipboard

Copied

以下のプログラムで、ボタン(a)を押すと半透明の図形を描画するが、繰り返しボタンを押すと

図形の色が濃くなる。どうすれば、最初の半透明の状態を維持できるか教えてください。

beginPath()を使いましたがうまくできませんでした。

 

this.a_btn.addEventListener("click", fl_ClickToPosition_a.bind(this));

function fl_ClickToPosition_a() {


 var test = new createjs.Shape();

 test.graphics.beginFill("red");
 test.graphics.moveTo(0, 0);
 test.graphics.lineTo(100, 100);
 test.graphics.lineTo(200, 300);
 test.graphics.lineTo(300, 50);
 test.graphics.lineTo(0, 0);
 test.graphics.endFill();

 test.alpha = 0.1;

 stage.addChild(test);
 stage.update();


}

Views

82

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
no replies

Have something to add?

Join the conversation