Post some code and we'll take it from there...
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of stinasius
Sent: Friday, March 06, 2009 10:50 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: how to close a titlewindow that was not
created as a popup
this is my code
import mx.containers.TitleWindow;
private function closeWindow(event:Event):void{
removeChild( event.target as TitleWindow);
currentState='';
}
Sure:
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.containers.TitleWindow;
private function onClose(event:Event):void
{
i am getting this error when i apply your code.
ArgumentError: Error #2025: The supplied DisplayObject must be a child of the
caller.
at flash.display::DisplayObjectContainer/removeChild()
at mx.core::Container/removeChild()
at custom_comps::login_register/closeWindow()
am calling it from with the titlewindow i would like to close. i also tried
calling it from the parent page that calls the custom titlewindow.
care to share how?
6 matches
Mail list logo