so i’m new to as3 and flash and i’ve just made my first steps…
I’m not happy with my hide/show function… the code works, but I think it is a waste of space on my stage that I need two buttons to hide and show a movieclip… there must be a better way
//play_ani_button
play_ani_button.addEventListener(MouseEvent.CLICK, hideObject);
function hideObject(event:MouseEvent):void {
description.visible=false;
story1.enabled=true;
play_ani_button.enabled=false;
}
//story button
story1.addEventListener(MouseEvent.CLICK, showObject);
function showObject(event:MouseEvent):void {
description.visible=true;
story1.enabled=false;
play_ani_button.enabled=true;
}
so my question is: How I have to change my code, that I only have to use one button?
sry for my bad english, but it isn’t my native language (like as3 :p)