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

ajuda please !!!!

Community Beginner ,
Aug 02, 2023 Aug 02, 2023

Copy link to clipboard

Copied

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 ???

TOPICS
ActionScript

Views

347

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

correct answers 2 Correct answers

Community Expert , Aug 03, 2023 Aug 03, 2023

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;

}

Votes

Translate

Translate
Community Expert , Aug 03, 2023 Aug 03, 2023

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.)

Votes

Translate

Translate
Community Expert ,
Aug 02, 2023 Aug 02, 2023

Copy link to clipboard

Copied

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

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 ,
Aug 02, 2023 Aug 02, 2023

Copy link to clipboard

Copied

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...

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 Expert ,
Aug 03, 2023 Aug 03, 2023

Copy link to clipboard

Copied

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;

}

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 ,
Aug 03, 2023 Aug 03, 2023

Copy link to clipboard

Copied

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 ...

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 Expert ,
Aug 03, 2023 Aug 03, 2023

Copy link to clipboard

Copied

LATEST

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.)

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