3 Replies Latest reply on May 22, 2006 2:06 PM by Wolf_van_Ween

    dynamic flv contentPath

    prisonerjohn
      Hi all,

      I am writing a script that loads the path to an FLV file and loads it in an FLVPlayback object. The FLVPlayback object is placed inside a MovieClip called "theVideo" and has the instance name "player".

      If theVideo is already on stage when the movie loads, this works fine. The problem is that until I actually load the FLV file, the FLVPlayback object is displayed with the "loading bars" in the timeline, and I am guessing this is wasting CPU cycles.
      If I try to load the MC when I am ready to load the video, the MC loads but I cannot seem to set the contentPath since I get these "loading bars".

      I checked my path and I know it is correct since it works with the first option, but I would need to do this the second way. Would anyone know why I am having problems setting the contentPath parameter?

      Thanks for the help


        • 1. Re: dynamic flv contentPath
          Wolf_van_Ween Level 1
          A couple of observations, maybe nothing to do with your problem:
          1) you attach a movieClip to _root, but you use a getNextHighestDepth of a different movieClip (contentMC ???
          2) did you just quickly type this from memory or did you copy/paste the code? You have spaces in front of and after "root."

          Other than that, I haven't understood what you mean with "loading bars in the timeline". Maybe you can expand on that a bit?

          Good luck
          Wolf
          • 2. Re: dynamic flv contentPath
            prisonerjohn Level 1
            I retyped the code quickly and that's why I had those mistakes there, but they are not in the original code. By loading bars in the timeline, I mean these green thingies

            Any ideas?
            • 3. Re: dynamic flv contentPath
              Wolf_van_Ween Level 1
              Maybe it's a timing issue. Create an additional button somewhere and put your contentPath assignment line into it's onRelease handler. Then execute your flash file, wait for some time when you see your "green thingies", then press the button.
              If you get different results, the player control simply isn't ready yet when you hand it the contentPath in the same code block.
              Alternatively, use the Media.setMedia() method to set the contentPath.