PDA

View Full Version : Problem accessing popup window content


GrEnDeL
10-14-2005, 09:37 AM
I cannot accede to the movie clip contained in the component "window". I try to do something like this:


newWindow = mx.managers.PopUpManager.createPopUp(_root, Window, true, {title:"Window", contentPath:"TheMovieClip", closeButton:true});
newWindow.content.variable="something";


But when I trace "newWindow" returns "undefined".

I cannot either accede to the movie clip of the window parent. I mean that, from "TheMovieClip" I cannot accede to the movie clip that creates the popup. Unless I give the complete path: _level0.depthChild0.content.TheMoveClip.variable (using the "Debug/Show vars" menu) or something like that. And this does not work all the time.

PS: I don't know if it's important: I'm creating the popup window from other popup window.

PS2: Why I cannot do this?


newWindow = mx.managers.PopUpManager.createPopUp(this, ...); // "this" does not work... ¿?


Thanks!

spy
10-14-2005, 03:32 PM
hey hi man.. i wonder why u did this:

newWindow.content.variable="something";

is it to give ur mc an instance name or something? and yes u can crate a window or alert from another window and is not suppose to crash, and of course u cant have access to the rest of the movie because u declared the window as "modal" this means the rest of the movie wont be available

newWindow = mx.managers.PopUpManager.createPopUp(_root, Window, true, {title:"Window", contentPath:"TheMovieClip", closeButton:true});