i have a script that once clicked ( a button ) some other thing hides then once clicked again it re-shows. the problem is once hidden it never shows again here is the script:
menu_start.addEventListener(MouseEvent.CLICK, myClickFunction);
function myClickFunction(event:MouseEvent) {
// Hide the first and show the next here
if (menu_menu.visible == true){
menu_menu.visible = false;
}
if (menu_menu.visible == false) {
menu_menu.visible == true;
}
}
Thanks so much.
Correct me if i am wrong in the above statement.
Now try something on what i say, have two buttons Hide and Show. Create two new function and try it out, if this works then there is something you are missing in your logic, if this does not work then let us know.
Also try this.
The other issue could be, when you click on the button may be its not getting the menu_menu property again as its hidden or destroyed. Is it inside the same component or called from somewhere else?