Skip to main content
This topic has been closed for replies.
Correct answer JoãoCésar17023019

Hi.

Try this:

import flash.events.MouseEvent;

function showObject0(e:MouseEvent):void

{

     object0.visible = true;

}

function showObject1(e:MouseEvent):void

{

     object1.visible = true;

}

function showObject2(e:MouseEvent):void

{

     object2.visible = true;

}

object0.visible = false;

object1.visible = false;

object2.visible = false;

button0.addEventListener(MouseEvent.CLICK, showObject0);

button1.addEventListener(MouseEvent.CLICK, showObject1);

button2.addEventListener(MouseEvent.CLICK, showObject2);

I hope this helps.

Regards,

JC

2 replies

JoãoCésar17023019
Community Expert
JoãoCésar17023019Community ExpertCorrect answer
Community Expert
July 20, 2018

Hi.

Try this:

import flash.events.MouseEvent;

function showObject0(e:MouseEvent):void

{

     object0.visible = true;

}

function showObject1(e:MouseEvent):void

{

     object1.visible = true;

}

function showObject2(e:MouseEvent):void

{

     object2.visible = true;

}

object0.visible = false;

object1.visible = false;

object2.visible = false;

button0.addEventListener(MouseEvent.CLICK, showObject0);

button1.addEventListener(MouseEvent.CLICK, showObject1);

button2.addEventListener(MouseEvent.CLICK, showObject2);

I hope this helps.

Regards,

JC

ankushr40215001
Inspiring
July 19, 2018

Hi Taufik,

Thanks you for joining this community.

We will gladly helo you, however, need some more info regarding your issue.

Is there any example link which we can refer to and help you further?

Thanks,

Ankush