Hi,
The loadMovie method allows you to load one .swf file into another at runtime. One problem that is often encountered with this method is the scope of timelines. If you use "_root" to define code in one movie and load it into another, the "_root" term always refers to the main timeline of the main movie and code defined with it in the loaded movie won't function. The workaround for Flash8 and later versions is the lockroot method. If you understand the scope of loaded movies, you can address it by adjusting the code for the loaded movie to account for the target path of where the movie is loaded,... either to a movieclip or a level.
Example... code for a button in a movie...
Code:
myButton.onRelease=function(){
trace("I was pressed");
}
If that movie is loaded into a movieclip in another movie, the code needs to account for the holder movieclip path...
Code:
movieClipName.loadMovie("buttons.swf");
movieClipName.myButton.onRelease(){
trace("I was pressed");
}
hope it helps
A mind once stretched by a new idea never regains its original dimensions.
- Oliver Wendell Holmes
Bookmarks