Skip to main content
Known Participant
November 30, 2022
Question

Activate and deactivate GESTURE

  • November 30, 2022
  • 1 reply
  • 691 views

I have to symbols on the stage.  I want the each symbol to move only when visible.

 

is this possible in action script.

 

.fla example here:

https://we.tl/t-n4JGyEkV5q

 

thanks!

o

 

 

This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
November 30, 2022

probably but how difficult that is depends on what causes a symbol to be visible.

 

it would be easiest if a symbol were made visible/not visible using actionscript.

oro1985Author
Known Participant
December 1, 2022

its visible using this:

hide_1.addEventListener(MouseEvent.CLICK, fl_ClickToHide);

function fl_ClickToHide(event:MouseEvent):void
{
strip1.visible = false;
strip2.visible = true;
}

kglad
Community Expert
Community Expert
December 1, 2022

you can use the interactive object mouseEnabled property:

 

hide_1.addEventListener(MouseEvent.CLICK, fl_ClickToHide);

function fl_ClickToHide(event:MouseEvent):void
{
strip1.visible = false;
strip2.visible = true;

stripF();
}

function stripF():void{

strip1.mouseEnabled=strip1.visible;

strip2.mouseEnabled=strip2.visible;

}