_parent target path

Hi All,

Targeting mcs is killing me. I have a mc called Jukebox on my main timeline. Within Jukebox is component code called JukeBoxClass. I am trying to reference a dynamic textbox (lyricsScroller) on my main timeline from my JukeBoxClass code. I can explain better if this is not clear. I thought the code would read something like this.


//this = JukeBoxClass registry of the component
//1st _parent = Jukebox mc timeline
//2nd _parent = main timeline
//lyricsScroller = my dynamic textbox on the main timeline

this._parent._parent.lyricsScroller;


Ohh ok, I think i know what your trying to do now … so what are you trying to do by calling the dynamic textbox?

PS-have you try’d assigning a _global variable to it?

Sandman9

Hey Sandman. Thanks for your help. The following code did work:


_root.mcEmpty.lyricsScroller;

It still bothers me I couldn’t do it by relative paths.

well you first try’d “this._parent._parent.lyricsScroller;” … so instead did you try

_parent._parent.lyricsScroller;
or
_parent.lyricsScroller;

Sandman9

Yes. I sure did. It seems like I am only 50% successful with relative paths. A lot of times, as in this case, I have to use hard paths.