9/23/2010 3:46:22 AM
Title:
Problem in parentDocument object
Hi all..
i have a module(say mod1.swf). i click on a link the module and open a pop up(say pop1) and perform some action. now i open another pop(pop2) by clicking pop1 and choose some data. now when i call a public function from pop2 to pop1 using parentDocument.functionname(), it is not going to pop1, instead it goes to mod1.swf.
can some1 tel the reason behind this..
also i want to knw how to go to pop1 from pop2(pop2 is opened by pop1)
Kiney
Points: 600
Posts:0
9/24/2010 4:51:29 AM
popup windows and alerts are linked to root of the application so there parent is root document , no matter from where they are opened. You can declare a public variable in the root of application and store the reference of your pop up windows . say your variable in Application root is
public var pop2Reference;
when creating popup2 window set it
Application.application.pop2Reference= myPopUp
Now you can access your popup2 from anywhere of the application using
Application.application.pop2Reference
I hope its clear