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
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.
stretches over 100 frames, and holder_mc does not appear on a
Now, I have a method in the class file for a_mc that uses a
to load a thumbnail into holder_mc, so the call to load the
clip looks like
Now, this does work... but only intermittently, and only
about 5% of the
time. Since I am from a programming background and never
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
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
sake) and that took care of the problem.
But, is this the only way to do this? Or would I have to do
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?
Yep, you have answered your question. Normally when you are
using classes it is not so good to depend on the objects placed in
different places of the class container movieclip. The common
approach is to create an onEnterFrame event on the empty moviclip,
wait until frame 30 and then execute the loading, finally deleting
the enterFrame. Another approach is to use the setInterval function
to make the loading perform at an specified point time.