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

Canevas html

Community Beginner ,
May 11, 2020 May 11, 2020

Copy link to clipboard

Copied

Hello Dear Community

I want to make a bulb light on in a canvas project, by click and hold on the button, and when I release the button is turning off, can you help me with it.

I need the code
Please help

Views

1.1K

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
Engaged ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

var _this = this;

_this.light_on.on('click', function () {

	_this.light_off.visible = true;
	_this.light_on.visible =false;

});


_this.light_off.on('click', function () {

	_this.light_on.visible = true;
	_this.light_off.visible=false;

});

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
Community Beginner ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

Thanks for the reply , but I don't get you this my fla on the attached file

https://lbhmus.com/fla/bulb.fla

 

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
Community Beginner ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

I got it thanks anyway

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
Engaged ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied


var _this = this;

_this.button.on('click', function(){

_this.bulb.gotoAndStop('on');
});

 

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
Community Beginner ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

thank you, if I want to add  conditions, click on two buttons ?

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
Engaged ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

_this.button.on('click', function(){

if (..............................)) {
/////code

} else if (......................................)) {
/////code
} else if (........................)) {
/////code
} else {
////code
}

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
Community Beginner ,
May 12, 2020 May 12, 2020

Copy link to clipboard

Copied

LATEST

thanks you very much

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