3 Replies Latest reply on Apr 23, 2006 7:45 AM by kglad

    duplicateMovieClip with externaly loaded movie

    Jan-Paul K. Level 1
      Hi

      the function duplicateMovieClip gives me a real hard time.
      I dynamically load certain parts of my application using the MovieClipLoader, then (when the external movieclip is completely loaded and intialized) I try to duplicate this movieclip using the duplicateMovieClip function, but it doesn't work.
      Using the function on a movieclip that has been created at design time or using createEmptyMovieclip work, but not with the externaly loaded ones.

      Is this some kind of security problem? How can it be solved.

      Any help is appreciated.
      Thanks in advance
      Paul
        • 1. Re: duplicateMovieClip with externaly loaded movie
          kglad Adobe Community Professional & MVP
          it's not a security problem. it's just something that flash doesn't support.

          to duplicate a movieclip it will need to be in a flash library.
          • 2. Re: duplicateMovieClip with externaly loaded movie
            Jan-Paul K. Level 1
            quote:

            it will need to be in a flash library.

            Does this mean it needs to be in _a_ flash library or in _the_ flash library of the main movie?
            In other words, could I mark the part of the external movielcip to be exported as actionscript variable and then use it with duplicate movieclip in the main movie? or is there any workaround to achieve the goal of having externaly loaded parts of an application to be duplicatable?
            Right now I do another loadMovieClip for every instance of the layout part instead of duplicating the previously loaded one. I guess as long as caching is enabled in the surrounding browser this is not a big problem, but if the cache is turned of I guess this solution will result in a lot of traffic slowing the application down.
            • 3. Re: duplicateMovieClip with externaly loaded movie
              kglad Adobe Community Professional & MVP
              the movieclip can be in any library. but if it's not in the swf that contains the duplicateMovieClip() statement, you'll need to use shared assets.

              is there any browser in which you can eliminate the cache? i know you can limit the cache space, but unless your swf contains a graphic which is a substantial fraction of 1 mb, i don't think repeated downloading is a realistic concern.