Skip to main content
Lbhmus17424462
Participating Frequently
May 12, 2020
Question

Canevas html

  • May 12, 2020
  • 1 reply
  • 1275 views

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

    This topic has been closed for replies.

    1 reply

    CodeDeveloperOM
    Inspiring
    May 12, 2020
    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;
    
    });
    Lbhmus17424462
    Participating Frequently
    May 12, 2020

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

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

     

    Lbhmus17424462
    Participating Frequently
    May 12, 2020

    I got it thanks anyway