I need to load an external swf into a target within an mc on my main stage. I have this code from tableau.com but can’t seem to make it work when loading into the target on _root / _level0. I have also looked at the Kirupa tutorial ‘Preloader and Transition for Dynamic Files’ which is very similar, but I can’t seem to get that to work the way I want either – I think I’m getting mixed up on the variables part and whether I can load onto the same level? – please can anyone help me???
[COLOR=SlateGray]//initialise a variable[/COLOR]
nextMovie=“content1.swf”;
[COLOR=SlateGray]//load the starting movie into level 1[/COLOR]
loadMovieNum(nextMovie,1);
[COLOR=SlateGray]//button1 actions[/COLOR]
button1.onRelease=function(){
[COLOR=SlateGray]//this makes sure that content 1 isn’t already loaded[/COLOR]
if(nextMovie!=“content1.swf”){
[COLOR=SlateGray]//set the variable that holds the name of the movie to be loaded[/COLOR] nextMovie=“content1.swf”;
[COLOR=SlateGray]//tell the currently loaded content movie to play it’s outro animation[/COLOR]
_level1.gotoAndPlay(“outro”);
}
}
The above is the original tableau code, I have tried various combinations but nothing works. I need to load content1.swf into _root.all.content and set the variable accordingly – any help would be greatly appreciated.
p.s having just typed all that I’ve realised that part of my problem (when I got it to do something rather than nothing), was that _level0/_root contains my interface, so when I was loading the external swf to level0, I was replacing the objects on my interface. Having said that, how would I move an existing targetMC on my main stage to sit on _level1 – can that be done??
Anyway, y’all probably know a much better way of doing this than me, so any help would be great!
Many thanks in advance!!