# Preloader and Transition for Dynamic Files Question

**URL:** https://forum.kirupa.com/t/preloader-and-transition-for-dynamic-files-question/184662
**Category:** flash
**Created:** [April 6, 2006, 5:21pm UTC](https://forum.kirupa.com/t/preloader-and-transition-for-dynamic-files-question/184662 "2006-04-06T17:21:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![certainfate](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@certainfate](https://forum.kirupa.com/u/certainfate)
#### Post date: [April 6, 2006, 5:21pm UTC](https://forum.kirupa.com/t/preloader-and-transition-for-dynamic-files-question/184662/1 "2006-04-06T17:21:49Z")

</div>

I have worked this tutorial out and it works great… I have named it photos.swf. BUT I have a main movie that will load photos.swf … photos.swf loads a bunch of other movies that are attached to button functions. These load in an empty mc like the tutorials explains. It works fine by itself but when I load photos.swf into an emptymc in the main movie it does not work anymore. I tried changing \_root to \_parent but still no dice. I also searched this forum and have found nothing… I am sure others have had the same question but I can’t find the answer.

Thanks

---

<div class="post-metadata">

### Author: ![nightmusique](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nightmusique](https://forum.kirupa.com/u/nightmusique)
#### Post date: [April 7, 2006, 5:25pm UTC](https://forum.kirupa.com/t/preloader-and-transition-for-dynamic-files-question/184662/2 "2006-04-07T17:25:16Z")

</div>

I had the same problem when I was building my site. First you have to make sure that the hierarchy in your movies is absolutely right- that means getting rid of the \_root deal and substituting it with \_parent or \_parent.\_parent, etc. also some things on the main timeline in your swf can just relate to it directly without a \_parent reference. it really is a try and error deal. after that you need to create a variable in your main movie or your holder movie - call it \_root.section = “photo.swf” If photo is the first swf you are loading. after that you can reference this variable from any swf by \_root.section. You can use it to load other movies in your empty movie clip.let’s say you have a link button in your photo swf.attach something like this to it :  
on (release) {  
if (cucurrMovie != “link”) {  
currMovie = “link”;  
\_root.section=link+".swf";  
\_parent.gotoAndPlay(“opening”);  
“opening” is the frame where I have some tweens before I load the next movie it ends with an action :  
stop();  
loadMovie(\_root.section,\_root.container);  
where container is the name of my empty movie clip where I load everything.hope it helps. i found the kirupa tutorial about transition very helpful  
good luck:devious:

---

<div class="post-metadata">

### Author: ![certainfate](https://avatars.discourse-cdn.com/v4/letter/c/b3f665/32.png) [@certainfate](https://forum.kirupa.com/u/certainfate)
#### Post date: [April 7, 2006, 11:51pm UTC](https://forum.kirupa.com/t/preloader-and-transition-for-dynamic-files-question/184662/3 "2006-04-07T23:51:23Z")

</div>

Thanks! I had actually gotten it to work… but now it does not work anymore! i am using movieclips as buttons and all of a sudden they won’t trigger the animation and/or load the .swf into the emptymc. If I change the movieclip to a button it works… any ideas on that one?

I also found the tutorial to be very good… now I am just getting in the way.

> [@nightmusique](#):
>
> I had the same problem when I was building my site. First you have to make sure that the hierarchy in your movies is absolutely right- that means getting rid of the \_root deal and substituting it with \_parent or \_parent.\_parent, etc. also some things on the main timeline in your swf can just relate to it directly without a \_parent reference. it really is a try and error deal. after that you need to create a variable in your main movie or your holder movie - call it \_root.section = “photo.swf” If photo is the first swf you are loading. after that you can reference this variable from any swf by \_root.section. You can use it to load other movies in your empty movie clip.let’s say you have a link button in your photo swf.attach something like this to it :  
> on (release) {  
> if (cucurrMovie != “link”) {  
> currMovie = “link”;  
> \_root.section=link+“.swf”;  
> \_parent.gotoAndPlay(“opening”);  
> “opening” is the frame where I have some tweens before I load the next movie it ends with an action :  
> stop();  
> loadMovie(\_root.section,\_root.container);  
> where container is the name of my empty movie clip where I load everything.hope it helps. i found the kirupa tutorial about transition very helpful  
> good luck:devious:
