Macromedia Flash Movies, Sound Loops, Tutorials, Action Scripts, Menus, Buttons, Web Templates, intros & more!

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

 Submit Here! · Link to Us · Newsletter · Tell a Friend · · Make It Homepage

» Advertisement

Create Speaking Characters for your website and Flash movies. 15 Day Free Trial









Go Back   Flash Tutorials, flash help, action script and flash discussion > Development > Flash Scripting


Tags: , ,

Reply
 
Thread Tools Display Modes
  #1  
Old 07-29-2004, 12:45 PM
fino fino is offline
 
Join Date: Jul 2004
Posts: 5
fino is on a distinguished road
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)
Reply With Quote
Sponsored
jeet jeet is offline
 
Join Date: May 2004
Default
  #2  
Old 07-30-2004, 10:11 PM
blake blake is offline
 
Join Date: Nov 2003
Location: Adelaide, Australia
Posts: 86
blake is on a distinguished road
Send a message via MSN to blake
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
__________________
http://www.flashnoob.com/
Reply With Quote
  #3  
Old 07-30-2004, 11:23 PM
NTD NTD is offline
Moderator
Moderator
 
Join Date: May 2004
Location: U.S.A.
Posts: 2,890
NTD has a spectacular aura aboutNTD has a spectacular aura aboutNTD has a spectacular aura about
Send a message via AIM to NTD
Default

Hi,

Quote:
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') ;
}
Reply With Quote
  #4  
Old 08-12-2004, 06:06 PM
fino fino is offline
 
Join Date: Jul 2004
Posts: 5
fino is on a distinguished road
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
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Navigation With _root maziagha General Flash 5 11-28-2006 12:17 PM
_root. Absolute path won't work. Shadar Logoth Advanced Flash 4 10-30-2006 06:58 PM
Controlling _root with a movieclip event Allwyn Flash Scripting 2 05-28-2005 06:40 PM
Control _root from movie Simon Newbies 2 04-06-2005 09:06 AM

All times are GMT. The time now is 12:52 AM.



Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Forum SEO by Zoints