Welcome, Guest
  • Author Topic: Close down window component from _root  (Read 1496 times)

    morgan

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Close down window component from _root
    « on: 07/11/06, 06:42 »
    Hi all,

    I've have a window, created with popupmanager, called my_win containing a movieclip with linkage my_mc. I can access the content via my_win.content.test.text = "testing"; etc...

    Within my_mc I have a function as below:

    function closePopup() {
       _parent._parent.deletePopUp();
       trace("closePopup");
    }

    My problem is that I cant call the function from anywhere else than from within the moveiclip?

    Anyone got a clue?

    Thanks!

    //Morgan

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Close down window component from _root
    « Reply #1 on: 07/11/06, 08:00 »
    To access the content you need to wait the onComplete handler (check the components dictionary)
    And you need to refer to the window pointer:

    _parent._parent.my_win.deletePopUp();

    Jorge