1 Reply Latest reply on Feb 28, 2007 7:41 AM by tonyhigham

    AttachMovieClip Issues

    srib Level 1
      Hi All,

      I am attaching a movie clip from the library.

      The movie clip has a FLVPlayer inside it.
      The instance name of the player is "myPlayer"

      _root.attachMovie("play_mc", "playClipmc", _root.getNextHighestDepth())

      after attaching that i am loading the video inside the attached movie clip

      _root.playClipmc.myPlayer.load("mov.flv")
      _root.playClipmc.myPlayer.play()


      This is not playing the FLV.

      Can anyone tellme how to fix this issues please.

      Thanks & Regards,
      Sridhar B
        • 1. Re: AttachMovieClip Issues
          tonyhigham Level 1
          The problem is that your attached FLV player hasnt finished initializing, and the methods that you're calling don't exist yet. An easy solution to this problem is this:

          _root.attachMovie("play_mc", "playClipmc", _root.getNextHighestDepth())

          onEnterFrame = function(){
          _root.playClipmc.myPlayer.load("mov.flv")
          _root.playClipmc.myPlayer.play()
          delete onEnterFrame
          }

          Alternatively, you could do the same thing with a setInterval, and clear it in the function, or even use the doLater method of another component on the stage.

          Hope this helps...