Hi,
Actually, even attachMovie requires time for instantiation. I've run
into a number of instances where I had to allow a frame to elapse before
I was able to work with the attached movie. It's better practice to check.
Regards,
Patrick
-----------------------------------------------------
www.baynewmedia.com IRC (
www.dal.net) -> #baynewmedia
-----------------------------------------------------
[quoted text, click to view] kglad wrote:
>yes, that would work to test to see if any movieclip has been instantiated. i
>can't think of any situations where you need to check if an attachMovie() has
>been instantitated, though. every situation i can think of has a more direct
>way of determing what's been attached.
>
>
how can that code work? you're checking to see if the target exists, you're
not checking to see if anything is loading or has loaded into the target.
you'll need to use preloader code of some type to check if loading is
completed no matter where the swf is being retrieved.
Yes kglad,
You are exactly right. That works on an "attached" movie not a loadMovie. If
you use attachMovie(); then test for undefined that will tell you if you have
attached the movie.
For loadMovie you do need to test the bytesLoaded() of the movieClip.
yes, that would work to test to see if any movieclip has been instantiated. i
can't think of any situations where you need to check if an attachMovie() has
been instantitated, though. every situation i can think of has a more direct
way of determing what's been attached.
Are you talking to me?
a movieclip will instantiate when an attachMovie() is used.....
if(mc.attachedMC == undefined) { // then the movie has not yet been
attached
mc.attachMovie("attachedMC",aDepth);
} else { // has been attached
// ignore the call to attachMovie
}
Does that answer any questions as to what I was talking about?