header
ask question
Click here to ask Question Now Its free No registration required. Flash, Flex, Flash Media Server, ActionScript,Adobe Air. Most questions receive a response in an hour.
Venkatesan
Points:170
Posts:0

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)



1
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


Post your Reply
Name  

Email

Type your Reply or Answer

Are you human? What is 8+7 



Members Login

Email  
Password
Forgot Password





This website focus on: Flash | Flex | FMS | RED5 | WOWZA | Flash Media Server | Adobe AIR | ActionScript,Flash Solutions | Flash Question | Flash Answers | Flash Developers | Flash Problem, Flash Help, Flash bugs, Flash workaround | Flash Blog | Flex Question Answers | Flash Forum | Flex Development | Actionscript development | Flash development | Adobe AIR development
Copyright © 2008 AskMeFlash.com. All rights reserved. Privacy Policy | Terms & Conditions