Copy link to clipboard
Copied
Hi, everyone
I make 3 button for showing different object
Can you show me actionscript 3.0 for showing different object with 3 button
Sorry for bad language
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 thi
...Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Find more inspiration, events, and resources on the new Adobe Community
Explore Now