PDA

View Full Version : controlling dynamically loaded swfs



jbrewer
June 24th, 2003, 12:12 PM
okay, this may seem like a basic question, but when you are loading swf's dynamically, how can you controll them as they are coming in? For example: i want to load three swfs but i want them to sit invisible until the user clicks a button to change visibility and see the content. The problem seems to be that you can't control it until it's all there... here's the code i have been trying.function goMovie(xMovie, xLevel){
loadMovieNum(xMovie, xLevel);
mytry=false;
_root.onEnterFrame = function(){
preload("_level"+xLevel);
}
}
function preload(xMovie){
trace("fire");
if(mytry){
xMovie_mc = eval(xMovie);
lFrames = xMovie_mc.getBytesLoaded();
tFrames = xMovie_mc.getBytesTotal();
trace(lFrames);
if(lFrames==tFrames){
xMovie_mc.stop();
xMovie_mc._visible = false;
_root.onEnterFrame = null;
}
}
//mytry=true;
}
goMovie("contact.swf", 10);
Any one else out there experienced this problem??? any one got any ideas???
thanks for taking the time.

radicaljugnu
June 25th, 2003, 01:58 AM
i don't think it's possible to control loaded movies.

pom
June 25th, 2003, 10:09 AM
There a re LOTS of actionscripted preloaders on this board, search a bit and you'll find your answer :)

jbrewer
June 25th, 2003, 12:29 PM
its not the preloader i need, but a way to controll it once it is loader, but before it appers... does that make sense? if i am being an idiot could you point me to one (preloader) that you know will resolve my issue?
thank you.