You can get the parent of your small component and center relative it.
I tryied to do this, but without success :-(
I have to do somthing wrong, but I don't know what. I have error "possibly call to undefined function"
How to call function declared in parent, or even two levels higher then component from I would like to call it?
To call method you showl get a reference to object and call this method.
But's it's works without it. Like this:
var renameW:TitleWindow = TitleWindow(PopUpManager.createPopUp(this.parentDocument as DisplayObject, TitleWindow, true));
Thanks a lot! This solve my problem!
What about if for instance my custom component will be nested into another very small custom component? Is it something like "this.grandparentDocument" ???? or grandgrandparentDocument?
No, only parent, parentDocument and parentApplication.
If you need mode, then this.parent.parent and so on, but i think it's not a good idea.
mx.core.Application.application.MyFunction(); I know, that it isn't a good way. How to call function declared in other component?
You shouldn't be calling methods like that.
Dispatch a custom event from within the popup and listen for that event.
Check the docs on how to do so if you're not familiar with custom events: