View Full Version : A question of Paths? _root vs. _parent
jOEL
May 21st, 2003, 07:55 AM
I have several SWFs that I need to work when loaded into another container SWF file as well as work when they are stand-alone SWF files.
Because of this, in circumstances where a movieClip is being talked to from another MovieClip I am using _parent as opposed to _root.
It has been working fine until now. I have one circumstance that only works with _root and will not work with _parent.
_root.content_mc.anim_mc.screenShots_mc.gotoAndSto p(2);
Obvously this works fine as a stand alone but not of course once loaded into the container movie.
Any suggestions?
Any help would be greatly appreciated.
brainy
May 21st, 2003, 07:59 AM
well, you have to use some kind of relative relation between the mc thats calling, and the mc that's being called. you havent stated where you're calling that from, so i cant really help... if you'd state whats the calling mc's path, i could help you build a relative path statement.
pom
May 21st, 2003, 08:16 AM
Relative paths: http://www.kirupa.com/developer/actionscript/tricks/relativeaddressing.asp
jOEL
May 21st, 2003, 08:19 AM
Well...I'll try.
the MC anim_mc has a stop action on it. At that point on it's time line there is a layer with an instance of the MC 'mcCursor" on it that plays...that MC has a frame action on it that tells another MC on the anim_mc timeline (screenShots_mc) to play:
_root.content_mc.anim_mc.screenShots_mc.gotoAndSto p(2);
I didnt think it was possible to make a relative path without using ../ type stuff cuz you have to go up a level and then down another level type thing.
this description proabably doesnt help you much?
brainy
May 21st, 2003, 08:39 AM
uhm, up a level, and than down a level is totally possible...
well, im not sure i got it right, but you're calling this from 'mcCursor' which sits inside anim_mc? so the call would be:
_parent.screenShots_mc.gotoAndStop(2);
jOEL
May 21st, 2003, 08:46 AM
THANX BRAINY!
worked sweet.
I was adding too many steps...all I needed to do was go up one level and down one.
what i was doing was going up 3 and down 3! (like you would using _root)
Thanx a bunch!
jOEL
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.