Or make nc a property of the class so you can use it in any method.
--- In [email protected], Alex Harui <aha...@...> wrote:
>
> Try myPanel.owner
>
>
> On 6/9/10 8:23 AM, "bhaq1972" <mbha...@...> wrote:
>
>
>
>
>
>
> I added a Panel component into a NavigatorContent
>
> public function aMethod():void
> {
> var nc:NavigatorContent = new NavigatorContent();
>
> nc.addElement(myPanel);
> }
> Now, in another method I want to access this NavigatorContent
>
> eg
> public function anotherMethod(myPanel:Panel):void
> {
> var nc:NavigatorContent = myPanel.parent as NavigatorContent;
>
> however nc is not myPanel.parent.
>
> doing a trace, the navigatorContent is actually
> the myPanel.parent.parent.parent
>
> Is there not a property/method which gets me a reference to the element Parent
>
> (a bit like addChild() / parent relationship)
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>