Skip to main content
Participating Frequently
Aug 2, 2023 8:06 PM UTC
Answered

ajuda please !!!!

ola pessoal quero fazer uma ação de visible , true or false.....estou usando a bola preta para aparecer o box1 ...i o quadrado verde para desaparecer...mais não queria asim eu quero a visibilidade do box1 true or false so em um objeto que seria a bola preta,, quando clikar ela possa aparecer i desaparecer ,, sera possivel somente usando o btn1 que seria a bola preta ???

This topic is closed to new replies. Start a new post to keep the conversation going.
kglad
kgladCorrect answer
Community Expert
Aug 3, 2023 3:11 PM UTC

haaaa mais uma vez obrigado é uma coisa simples em linhas de codigo ,,, mais como eu to começando agora com action script fica meio dificil ... mas vou aprender ,,, obrigado de novo né,,, 2 vez min salvando  ,,, obrigado man grato... espero não ter atrapalhado você pedindo isso ...


no problem.

 

(actually, when i first checked your message i was on my iphone which makes it difficult to see attached images.  if you would copy your screenshots and paste them into messages, they are much easier to view.)

5 replies

kglad
Community Expert
Community Expert
Aug 2, 2023 8:39 PM UTC

it's possible but the path from the button's parent to the object you want to control must be specified 

Translate
Participating Frequently
Aug 2, 2023 9:28 PM UTC

umnm e como seria tem como fazer a linha de código...onde seria essa especificação ? você já min ajudou uma vez ajuda mais essa ai por favor...

Translate
kglad
Community Expert
Community Expert
Aug 3, 2023 2:26 PM UTC

if the black ball is btn1 and you want it to control box1's visibility (while both are on the same timeline), use:

 

btn1.addEventListener(MouseEvent.CLICK, btn1F);

 

function btn1F(e:MouseEvent):void{

box1.visible = !box1.visible;

}

Translate