Skip to main content
Known Participant
August 23, 2010
Answered

_root. or _parent. or whatever?

  • August 23, 2010
  • 1 reply
  • 593 views

I have this problem now.

I load an external file to my main mc. The file is a flash doc. It has buttons in a movie clip. Normally The code for the buttons is

on (release) {

     loadMovie('8.png' , _root.box);

}

but the problem is. That the box instance is in the file. And when I use _root. it gets to the main document where it doesn't exist and i want it to stay that way.

I mean how to refer from a loaded file to the same loaded file not to the main one. Some kind of a path or something?

This topic has been closed for replies.
Correct answer Ned Murphy

If you put...

this._lockroot = true;

on the main timeline of the file that you are loading, any _root references used in that loaded file will refer to the loaded file's _root, and not the main file's _root.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Legend
August 23, 2010

If you put...

this._lockroot = true;

on the main timeline of the file that you are loading, any _root references used in that loaded file will refer to the loaded file's _root, and not the main file's _root.