0 Replies Latest reply on Apr 23, 2007 6:21 AM by Mark_Kramer

    FLVPlayback rendering issues


      This one is very strange. Another way to phrase the question would be "what does the act of adding a UIComponent to the library actually do?". Warning: by necessity, long winded.

      We are building a gallery that must display both images and videos in any order. There needs to be a transition between assets as you iterate over the array of assets. At any one time we have a movieclip that is actively displaying the asset. If it's a video, then there's an FLVPlayback child component in the movieclip created with attachMovie(). When an image is loaded we use a movieClipLoader. When it's time to load the next asset while the previous one is displaying, we clean up the hidden/background MovieClip with removeMovieClip() and then reuse the variable:

      // clean up any existing content
      clipToLoad_mc.removeMovieClip ();
      // get ready for the load
      clipToLoad_mc = createEmptyMovieClip ("image1_mc", this.getNextHighestDepth ());

      All this has been working great. We've got a nice fade with pan-and-zoom as well as a Tween zoom down to nothing transition working.The fla just has a single FLVPlayback component in the library. The rest of the code lives in action script files and classes.

      The trouble starts by adding any UIComponent to the library (you don't even have to use it yet, just add it to the library) and all of a sudden rendering the FLVPlayback control breaks. The call to removeMovieClip() to clean up the movieclip that's not showing doesn't work. Setting either of the clips _visible property to false doesn't work. If you're not using the FLVPlayback control, then iterating from image to image still works. When a video loads and the MovieClip hosts a FLVPlayback control, it plays (audio) but the videodisplay nor the skin renders. The previous image which has been told to disappear doesn't.

      Any clues on how to debug this? It makes no sense to me that the simple act of adding a UIComponent (button or anything else) to the library would cause a problem to something that was working perfectly. Delete the added component out of the library the code starts working again. This is a problem as we're at the stage where we need to add some skinned buttons.

      I can't post the project we have as it's huge. My next steps will be to try to build up a tiny repro case that demos the problem I guess. I'm hoping someone with a deep understanding of components and FLVPlayback will have a clue. I've already tried the drop dead simple repro of ploping an FLVPlayback and a button onto the stage and just setting FLVPlayback.contentPath via the Flash 8 IDE. That works. There's some hocus pocus going on with dynamically instantiating the FLVPlayback with two MovieClips and an image loaded into one with video in the other.

      If this rings a bell with anyone or you can see something obvious I'd love to know about. I'm quite stumped at the moment of how to go about debugging the issue.