loadMovie question
- Started
- Last post
- 6 Responses
- nearestexit
From a main .SWF file I am loading a second .SWF file into a blank MC. However, there is action script in the second MC that does not function because of the paths I used. Rather than rewrite the second MC, is there some way I can load the MC into the main .SWF and still allow the paths to work?
- cinder0
erm
hard to tell what you want to dobut yeah, you can load it into _root
- Kuz0
are you using the full path?
_root.MC.loadMovie("stuff/shit/t...
- nearestexit0
Ya, I'm not sure if I'm explaining this correctly.
Let me try again.
I have my main .SWF file that upon pressing a button within it will load an external .SWF file into a blank Movie Clip.
The external .SWF file runs fine when I play it by itself (that is if I don't load it into another movie).
When I load the external .SWF file into the main .SWF file, the external .SWF does not work. I'm guessing it has to do with the paths I set-up.
However, I don't want to go back and rewrite all the script for the external .SWF file.
So, my question is, is there some way to load an external .SWF file into a main .SWF file and not worry about what paths (absolute or relative) that I've set up and have that file work?
Any ideas?
- nearestexit0
i figured it out....
i just needed to put:
target_mc._lockroot = true;
in the first frame of the parent movie. target_mc is an instance name.
- imakedesign0
or change _root to _ parent.
- nearestexit0
Right, but '_root' is scattered everywhere throughout the loaded .SWF. It would be a pain to go back and change this for every _root I have in the movie.
I guess for the future, I'll start doing this. But for old movies that used _root, 'lockroot' is the way to go.