Question
Load movie into holder clip not on frame 1
Okay, here is the situation. I have a MovieClip, call it a_mc
which has its
own class file. In it are several additional MovieClips, some with, and
some without class files. One in particular, call it b_mc, has a class file
and is used as a holder for several additional MovieClips. One of those is
an empty MovieClip with an instance name, call it holder_mc. However, b_mc
stretches over 100 frames, and holder_mc does not appear on a keyframe until
frame 30.
Now, I have a method in the class file for a_mc that uses a MovieClipLoader
to load a thumbnail into holder_mc, so the call to load the clip looks like
this
my_mcl.loadClip(filePath, b_mc.holder_mc);
Now, this does work... but only intermittently, and only about 5% of the
time. Since I am from a programming background and never really learned
actionscript in a multi-frame environment I have a feeling it is because the
frame has not been reached with the holder_mc MovieClip when the call to
load is executed. Everything I do is always in a single frame even though I
know that is not taking full advantage of stuff you can do with Flash.
My solution was to make a copy of holder_mc and place it on the first frame
off the stage (figured it was better than making 0 alpha for processing
sake) and that took care of the problem.
But, is this the only way to do this? Or would I have to do something like
put my call to loadClip in an onEnterFrame that is checking to see if frame
30 has been reached, then loading the picture into it?
Thanks for any insight.
own class file. In it are several additional MovieClips, some with, and
some without class files. One in particular, call it b_mc, has a class file
and is used as a holder for several additional MovieClips. One of those is
an empty MovieClip with an instance name, call it holder_mc. However, b_mc
stretches over 100 frames, and holder_mc does not appear on a keyframe until
frame 30.
Now, I have a method in the class file for a_mc that uses a MovieClipLoader
to load a thumbnail into holder_mc, so the call to load the clip looks like
this
my_mcl.loadClip(filePath, b_mc.holder_mc);
Now, this does work... but only intermittently, and only about 5% of the
time. Since I am from a programming background and never really learned
actionscript in a multi-frame environment I have a feeling it is because the
frame has not been reached with the holder_mc MovieClip when the call to
load is executed. Everything I do is always in a single frame even though I
know that is not taking full advantage of stuff you can do with Flash.
My solution was to make a copy of holder_mc and place it on the first frame
off the stage (figured it was better than making 0 alpha for processing
sake) and that took care of the problem.
But, is this the only way to do this? Or would I have to do something like
put my call to loadClip in an onEnterFrame that is checking to see if frame
30 has been reached, then loading the picture into it?
Thanks for any insight.