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.
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.