Showing Object but The Other Object is Hidden with button
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, 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 this helps.
Regards,
JC
Already have an account? Login
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.