whoknows361
Technical User
Hey all.
OK, I have 3 swf files.
first swf is called main.swf. On main, I am preloading another of my swf's called bikeradial.swf. After it preloads & displays bikeradial.swf, it goes to a function, which preloads another swf, "frametest7.swf". After frametest7.swf is totally preloaded, it unloads the movie. This is done because bikeradial.swf is a looping preloading animation. What I want is to have bikeradial.swf continue to loop until framtest7.swf is totally loaded, however, when frametest7 is totally loaded, I want to to unload the .swf to that bikeradial loop has a chance to continue its loop all the way until frame 1.
Once bikeradial has continued its loop all the way to frame 1 & frametest7 has already been preloaded, Only then do I want it to load frametest7 over bikeradial.swf.
Here is my AS on main.swf.:
//begin code//
stop();
//begin intro loading process//
_root.attachMovie("loader", "loader", 18)
_root.loader._x = 339;
_root.loader._y = 350;
_root.loader._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.loader._visible = true;}
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.loader.bar._width = (lBytes/tBytes)*100;
_root.loader.pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
_root.loader._visible = false;
secondload();
trace(targetMC+" finished");
};
my_mc.loadClip(" _root.holder);
//second load global function//
_global.secondload = function(){
_root.attachMovie("loader2", "loader2", 18)
_root.loader2._x = 300;
_root.loader2._y = 350;
_root.loader2._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.loader2._visible = true;}
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.loader2.bar2._width = (lBytes/tBytes)*100;
_root.loader2.pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
_root.loader2._visible = false;
trace(targetMC+" finished");
my_mc.unloadClip(targetMC);
};
my_mc.loadClip(" _root.holder2);
}
//end code//
Here is my question. At this point, my AS does the following: It loads the first preanimation bikeradial.swf, then automatically begins to loads second movie framtest7.swf & removes it when preloaded in cache. But how do I make it appear only after bikeradial.swf has reached a certain frame? where do I have to add the AS? on bikeradial? what is the AS? I seem to be missing this last step. I hope this makes sense. Thanks in advance
Jonathan
OK, I have 3 swf files.
first swf is called main.swf. On main, I am preloading another of my swf's called bikeradial.swf. After it preloads & displays bikeradial.swf, it goes to a function, which preloads another swf, "frametest7.swf". After frametest7.swf is totally preloaded, it unloads the movie. This is done because bikeradial.swf is a looping preloading animation. What I want is to have bikeradial.swf continue to loop until framtest7.swf is totally loaded, however, when frametest7 is totally loaded, I want to to unload the .swf to that bikeradial loop has a chance to continue its loop all the way until frame 1.
Once bikeradial has continued its loop all the way to frame 1 & frametest7 has already been preloaded, Only then do I want it to load frametest7 over bikeradial.swf.
Here is my AS on main.swf.:
//begin code//
stop();
//begin intro loading process//
_root.attachMovie("loader", "loader", 18)
_root.loader._x = 339;
_root.loader._y = 350;
_root.loader._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.loader._visible = true;}
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.loader.bar._width = (lBytes/tBytes)*100;
_root.loader.pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
_root.loader._visible = false;
secondload();
trace(targetMC+" finished");
};
my_mc.loadClip(" _root.holder);
//second load global function//
_global.secondload = function(){
_root.attachMovie("loader2", "loader2", 18)
_root.loader2._x = 300;
_root.loader2._y = 350;
_root.loader2._visible = false;
my_mc = new MovieClipLoader();
preload = new Object();
my_mc.addListener(preload);
preload.onLoadStart = function(targetMC) {
trace("started loading "+targetMC);
_root.loader2._visible = true;}
preload.onLoadProgress = function(targetMC, lBytes, tBytes) {
_root.loader2.bar2._width = (lBytes/tBytes)*100;
_root.loader2.pText.text = "% "+Math.round((lBytes/tBytes)*100);
};
preload.onLoadComplete = function(targetMC) {
_root.loader2._visible = false;
trace(targetMC+" finished");
my_mc.unloadClip(targetMC);
};
my_mc.loadClip(" _root.holder2);
}
//end code//
Here is my question. At this point, my AS does the following: It loads the first preanimation bikeradial.swf, then automatically begins to loads second movie framtest7.swf & removes it when preloaded in cache. But how do I make it appear only after bikeradial.swf has reached a certain frame? where do I have to add the AS? on bikeradial? what is the AS? I seem to be missing this last step. I hope this makes sense. Thanks in advance
Jonathan