Hide/Unhide in AC3 - Quick help!
Hi, I'm fairly new to flash and action script 3 so this could be something basic but i have no idea how to do it.
All i want to do is have a button display a text box when clicked, and then if the button is clicked again - the text box will go away etc.
I have the button displaying the text fine but i don't know how to set it so it hides it when its clicked on again. text_btn = button and info_txt = text box
Thanks for your time!
heres that part of the code:
Code:
text_btn.addEventListener(MouseEvent.CLICK, textClicked);
function textClicked(evt:MouseEvent):void
{
loadText();
}
function textLoaded(e:Event):void {
info_txt.text = textLoader.data;
}
function loadText():void
{
textLoader.load(new URLRequest("FILE LOCATION"));
}