Copy link to clipboard
Copied
I have a flash file that is 1.5mb in size. As it takes about 6 minutes for someone on dialup to load this file, I have created a smaller swf file and loaded the larger one from it but I don't want the larger one to begin to play until it's fully downloaded. How do I set this up? I have set up the action script 2 as follows: loadMovieNum("top2.swf", 0);
1 Correct answer
yes, that should be addListener instead of addEventListener.
and, if you used that code, please mark this thread as answered. if you used different coding, please post your code for others and mark this thread as answered.
Copy link to clipboard
Copied
that won't work (as you probably now know).
insert an empty keyframe at frame1 of your loaded swf and attach a stop() to that frame.
then load that swf into your preloader using any target movieclip (or _level other than 0). when loading is complete execute a target.play().
Copy link to clipboard
Copied
Thank you for the help but can you be more specific please in the action script that I am to use for this part:
then load that swf into your preloader using any target movieclip (or _level other than 0). when loading is complete execute a target.play().?
Copy link to clipboard
Copied
you can use:
var mcl:MovieClipLoader=new MovieClipLoader();
var lo:Object={};
lo.onLoadInit=function(target:MovieClip){
target.play();
// remove any preloader display you have on-stage
}
mcl.addEventListener(lo);
this.createEmptyMovieClip("targetMC",0);
mcl.loadClip("yourlargeswf.swf",targetMC);
Copy link to clipboard
Copied
This doesn't work. There is an error in the code:
There is no method with the name 'addEventListener',
source mcl.addEventListener(lo);
This is what I used:
var mcl:MovieClipLoader=new MovieClipLoader();
var lo:Object={};
lo.onLoadInit=function(target:MovieClip){
target.play();
// remove any preloader display you have on-stage
}
mcl.addEventListener(lo);
this.createEmptyMovieClip("targetMC",0);
mcl.loadClip("top2.swf",targetMC);
Copy link to clipboard
Copied
I figured it out - not so complicated.. Thanks for you help anyway.
Copy link to clipboard
Copied
yes, that should be addListener instead of addEventListener.
and, if you used that code, please mark this thread as answered. if you used different coding, please post your code for others and mark this thread as answered.
Copy link to clipboard
Copied
This is how I eventually did this:
Created 2 layers.
Layer 1 has my existing image which I put a stop action to in the 1st frame.
Layer 2 has a link to the external swf file with this action: loadMovieNum("top2.swf", 2); in the 1st frame.
So the initial image stays up until the top2.swf is fully loaded. This is for people with dialup. A lot of the clients who will look at this particular web site are rural and only have dialup access to the internet. The animation loads quickly for high speed.
Here's the web site if you wish to view the result.

