Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 4 of 4

Thread: _root -against- _parent?

  1. #1

    Default _root -against- _parent?

    This are instructions given to a button (inside a mc called "SlideMenu") in order to play a certain frame ("Topicin") in another mc called "mvTopicPortf".

    Why is that the first line of code works
    and the second one doesn't?

    _parent.mvTopicPortf.gotoAndPlay("Topicin")

    _root.mvSlideMenu .SlideMenu.mvTopicPortf.gotoAndPlay("Topicin");

    Can anyone give me a hand on this?
    (I am using Flash MX)

  2. #2
    Join Date
    Nov 2003
    Location
    Adelaide, Australia
    Posts
    86

    Default

    I'm guessing this question is just out of interesting as you can just use the one that works but here we go anyway.

    The _parent of a mc is either a _root if it is on the stage or a mc if it's inside a movie clip. _parent goes to the level up ie.

    _root. - level 0
    mc_funny - level 1
    |
    Mc_inside_mc_funny - level 2
    |
    Dancing Banna - level 3

    Dancing bannas' parent would be Mc_inside_mc_funny because it is going up a level.

    _root on the other hand would just go to the top (level 0) ect...

    the only flaw that i can see in your code the the space between mvslidemenu and slidemenu


    Fixed-

    Code:
    _root.mvSlideMenu.SlideMenu.mvTopicPortf.gotoAndPlay("Topicin");
    good luck, reply back , cheers

    blake

  3. #3
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    This are instructions given to a button (inside a mc called "SlideMenu") in order to play a certain frame ("Topicin") in another mc called "mvTopicPortf".

    Why is that the first line of code works
    and the second one doesn't?

    _parent.mvTopicPortf.gotoAndPlay("Topicin")

    _root.mvSlideMenu .SlideMenu.mvTopicPortf.gotoAndPlay("Topicin");
    Where is the "mvSlideMenu" name from?.... If on the main timeline you have a movieclip named "SlideMenu" with a button inside, the path to access that button would be......

    on(release) {
    _root.SlideMenu.buttonName.gotoAndPlay('Tropicin') ;
    }

  4. #4

    Default

    Hi!
    The reason why I took so long to reply is because I've been on hollidays.
    Anyway I just wanted to say "Thanks" for beeing there helping the ones, like my self, to understand better action script.
    The problems of my Flash project conserning action script still remains to be solved, however I believe that they soon will be overcome.


    You are a major help.
    Thanks blake
    Thanks NTD

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Navigation With _root
    By maziagha in forum General Flash
    Replies: 5
    Last Post: 11-28-2006, 01:17 PM
  2. _root. Absolute path won't work.
    By Shadar Logoth in forum Advanced Flash
    Replies: 4
    Last Post: 10-30-2006, 07:58 PM
  3. Controlling _root with a movieclip event
    By Allwyn in forum Flash Scripting
    Replies: 2
    Last Post: 05-28-2005, 07:40 PM
  4. Control _root from movie
    By Simon in forum Newbies
    Replies: 2
    Last Post: 04-06-2005, 10:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts