im currently working on a full flash site and in the main page of this site i use an empty movie clip called contents to call up the next page of the site (these pages are seperate swf files loaded into the clip), inside one of these swf files , i have another empty movie clip to open a subsection of that page into (i have named this one contents2) (e.g. of me doing this is having link on main page to a manufacturers section, loading a page with buttons ranging from a to z, then user selecting the letter and having the relevant page open just under the selection box with the list of mfrs beginning with what letter they are after.)
When i test the 2 swf’s together they link fine, but when i update my site with the pages the links dont work. At first i used the
on (release) {
_root.contents2.loadMovie(“nameofswf.swf”);
}
command but this didnt do anything when posted to my site, so i also gave it a try with the _parent rather than _root as a wild shot, but also didnt work.
Yes youv got the idea of how its working (or how it should be!!).
I changed the actions of the button to the below :
on (release) {
_root.manufacturers.contents2.loadMovie(“0-9.swf”);
}
Manufacturers is the name of the swf with the empty movie clip , contents2 the movie clip name and 0-9.swf is the swf file name. Iv published it and tested on my page but still doesnt seem to load the movie.
U dont think it has anything to do with file names or names being too long or anything does it?
Doublecheck to make sure you named the instance name of the EmptyMC in your manufacturers swf. Also could you confirm that this button is located in your manufacturers swf. You could simplify the code and say.
on (release) {
this.contents2.loadMovie("Zero_Nine.swf");
}
Also it might not like the name “0-9.swf”. Try “Zero_Nine.swf”. I know Flash doesn’t like variables that start with numbers.
I took your advice and simplified it, renamed the empty movie clip to contents, and also changed the file name to zero_nine.swf , the action behind the button is now :
on (release) {
this.contents.loadMovie(“zero_nine.swf”);
}
I haven’t really experienced that. As long as the swf you want to load is in the same folder, regardless of local machine or web server, it should work like such.
on (release) {
this.contents2.loadMovie("Zero_Nine.swf");
}
if the additional swf was in a another folder from the directory your main swf was in rather than put the full address , would it work with just (if the folder was in the same root as the main swf)
on (release) {
this.contents.loadMovie(“foldername/swfname.swf”);
}
is it neccessary to put the whole destination ? (e.g. www.website.etc etc)
hardcoding the path was how I learned it - I suppose the real benefit is just that there’s no room for confusion. If you were to move your main movie, say, to another folder, the browser could still access the loaded movies b/c the whole URL is indicated.
Of course the converse of that is true too! :beam: