2 Replies Latest reply on Dec 20, 2013 3:38 PM by Amy Blankenship

    Why is copy/paste of Library assets done so badly?

    goodnewsjim

      Windows does copy/paste correctly.  When you copy/paste something in windows, it changes a file: "apple.txt" to "Copy of apple.txt"

      If you copy again, it gives you "Copy(2) of apple.txt"

       

      Windows doesn't create an entirely new directory structure to put "apple.txt" somewhere.

       

      Besides the obvious problem of having to constantly delete directory structures in Flash Professional CC when copying stuff, it also breaks the functionality of files.

       

      Let me give an example how copy/pasting in library simply does not work because of this:

       

      I have a directory:

      _Bri

         -Bitmaps

         -Movieclips

       

      In Bri/Bitmaps I have the raw .pngs

      in Movieclips I have the symbols/movieclips built from them

       

      One movieclip might be called:

      PUNCHEAST

       

      It draws from 4 bitmaps in bri/bitmaps

       

      Now where it breaks down is here:

      I want to copy PUNCHEAST to make ATTACKEAST using the same .pngs

       

      So I copy PUNCHEAST and paste PUNCHEAST

      The directory structure now looks like this:

      _Bri

        _Bri

             -Bitmaps

                puncheast1.png


      puncheast2.png

      puncheast3.png

      puncheast4.png

             -Movieclips

                -PUNCHEAST

      -Bitmaps

          puncheast1.png

          puncheast2.png
          puncheast3.png
          puncheast4.png

             -Movieclips

                -PUNCHEAST

       

      As you can see, it copied not only the MOVIECLIP container PUNCHEAST, but also all the .pngs too!

      Now when I rename PUNCHEAST in the redundant directory to ATTACKEAST, copy it over, and then delete the redundant bitmaps what happens is it ends up being a blank animation:

       

      _Bri

      -Bitmaps

          puncheast1.png

          puncheast2.png
          puncheast3.png
          puncheast4.png

             -Movieclips

      -Movieclips

        -PUNCHEAST

        -ATTACKEAST(now is blank because it was referencing the copied .png)

       

      --------------------------------------------------

      All this would work fine if instead of copying the entire directory structure, it would have done this when pasting:

       

      _Bri

        -Bitmaps

          puncheast1.png

          puncheast2.png
          puncheast3.png
          puncheast4.png

             -Movieclips

        -PUNCHEAST

        -Copy of PUNCHEAST

       

       

      That is all.

        • 1. Re: Why is copy/paste of Library assets done so badly?
          robdillon Most Valuable Participant

          I think you may be doing more work than you need to do here.

           

          If you have one movieClip that you want to replicate on the stage, you only need one original movieClip in the Library. If you drag one instance of the puncheast movieClip onto the stage, you can then name that first instance "puncheast1". Then you can either: drag additional instances of that movieClip to the stage, or, you can copy and paste the puncheast1 movieClip as many times as you need. Then name each new instance of the movieClip as you like.

           

          If you are creating the instances using Actionscript then open the Properties window for the original puncheast movieClip in the Library and set it to Export for Acrionscript and give it a Class name.

           

          In any case, yes, Flash builds up a directory structure for every imported object in the LIbrary. This is done to insure that each item in the Library is unique and that there are no file name or Class name conflicts.

          • 2. Re: Why is copy/paste of Library assets done so badly?
            Amy Blankenship Level 4

            Actually, you can avoid most of this by just pasting into the root. For some reason, Flash assumes that is where you want to paste. Or, right-click on the library symbol and select Duplicate Movie Clip. Or, use Swap Instance for Duplicate Symbol (my personal favorite).