Hello! I am new to the forum and I’ve joined it because it solved some of my problems. I am making a site that describes objects. When you click an object on the stage it makes a “new window”(details_mc.visible = true) appear that displays a picture and some text loaded from an external text file. details_mc has a close button created that has this code:
(this is actualy on the actions layer)
stop();
close_btn.addEventListener(MouseEvent.CLICK, hideDetails);
function hideDetails(event:MouseEvent):void {
MovieClip(this.parent).details_mc.visible = false;
TextField(this.parent).details_txt.unload(); // I also tried with MovieClip instead of TextField
}
the only problem is that the textfield from the details window doesnt want to dissapear or unload so i can load another text field inside it. it gives me an error: 1119: Access of possibly undefined property details_txt through a reference with static type flash.text:TextField.
all I want to happen is that when I click the close button the window dissapears, as well as the text. also the textfield is ready to load a different external text file.
I really hope you guys can help me!