3 Replies Latest reply on Aug 8, 2007 8:14 AM by Rothrock

    attachMovie loaded

    BeniRose Level 1
      I'm creating a dynamic instance of FLVPlayback for use with some ad serving. Flash shows that I have to use attachMovie in order to create a dynamic instance of FLVPlayback. After I make this call, I immediate call some functions that use the FLVPlayback instance I created. These functions are failing because the attachMovie hasn't finished.

      How do I detect when my attachMovie has finished loading the MC from my library so I can call the functions after?
        • 1. Re: attachMovie loaded
          kglad Adobe Community Professional & MVP
          attachMovie completes immediately, but only the first frame of the attached movieclip is instantiated immediately.
          • 2. Re: attachMovie loaded
            BeniRose Level 1
            Gotcha. Well for some reason I guess the VideoPlayer component of the FLVPlayback isn't loading right away because when I call the function it's undefined. Maybe I'll just put all those calls in a function and do a setInterval for 1 second. Thanks for the reply.
            • 3. Re: attachMovie loaded
              Rothrock Level 5
              I think I had read something somewhere about how the first "order" of children are avaialble immediately, but any children of those children take a frame to become available. I'm not explaining that correctly probably, but it is likely what is going on.

              I don't think you will need 1 second that is a really long time! More likely 10 to 50 milliseconds – or whatever your framerate would require. It is kind of an ugly hack, but something like using an onEnterFrame for one frame and then deleting it will give you the minimum certain delay.