6 Replies Latest reply on Aug 28, 2012 6:27 AM by sinious

    Difficulties with movie clips and frames


      This is really irking me.


      I am extremely new to Flash so please bear with me. I am assuming that this is a simple, easy to fix problem that I am having. I have Adobe Flash Professional CS5.5.


      What I am trying to do is display a sequence of images after other movie clips stop playing.


      The image sequence itself does what it is supposed to and works properly, and the other movie clips also are successful. However, whenever I try to put the movie clips for the images in frames or keyframes, the beginning movie clips only play part of the way before the images show up. This happens even though the images' movie clips are on frames/keyframes (I've tried both) after the other movie clips.


      The movie clips that are supposed to play first are each on a separate layer and there are two of them.


      The first layer is called "tree" and the second is called "text"


      The tree layer has a 45-frame gif animation that I have turned into a movie clip. I have created a motion tween and changed its alpha so that the gif has a fading in and out effect. I also have it so that it stops replaying once it reaches the last frame. I am using stop(); for this.


      The text layer has a 40-frame gif animation that I have also turned into a gif. This gif is also a movie clip and also has motion tween. Its alpha has also been changed.


      Both tree and text play together successfully and how I want them to.


      The sequence of images is three separate images, each a different layer, that fade into eachother. These images are pngs, therefore they aren't gifs nor do they have their own frames.


      The bottom layer is called floor1 and has frames 1 through 50 of motion tween and alpha adjustments fading the png image. The image is a movie clip.

      The layer on top is called floor2 and has frames 51-100 of a different png image fading.

      The very top layer is called floor3 and has frames 101-150 of yet another png fading.


      The images are successful in doing what they are supposed to.


      Layers tree and text are one fla file, and layers floor1, floor2, and floor3 are a separate fla file.


      When I copy the frames from layers floor1, floor2, and floor3 into a keyframe after layers text and tree, they transfer properly, but when I test the animation, the image sequence shows up a lot sooner than it is supposed to, interrupting the movie clips on the layers text and tree. I have tried moving the floor# layers' keyframes farther down the timeline, but then the other movie clips just stop.


      In the fla file with layers text and tree, I've imported the gifs into the library and then put them onto the stage.


      In the fla file with the floor# layers, I've imported the pngs into the stage.


      Here's what the text and tree layers look like:


      Here's what the floor# layers look like:


      The rest of the frames for the floor#s...



      So, I thought that the problem was that I needed to delay the image squence. I looked around and found no code or anything for that..


      Afterwards, I thought that it was because I had imported the tree and text gifs to the library before putting them on the stage.


      I opened a new fla and imported the "tree" gif straight to the stage.


      I figured that this should work because then it would show each of the individual frames in the movie clips, which it doesn't do in the above pictures. By importing the gif like this, it does show the individual frames. I've tested this with the image sequence and it works fine. But I have a problem with this method too..


      I select all of the frames for the gif to convert into a symbol, so I can add a motion tween and mess with the alpha. However, only the last frame is converted into a movie clip. Well actually no... Only the circled frames below are turned into the movie clip. Even when all of the frames are selected.  This isn't very helpful because then I can't change the alpha for the entire gif nor can I create a motion tween without getting a message saying that the motion tween could not be applied to all of the frames.

      Here's what this version of "tree" looks like.


      And the frames continue like so until 135.


      The frames that are turned into the movie clip are circled below.


      If I can solve the issue that I'm having with the tree shown in the two pictures above this sentence, then I can display the movie clips and image sequence without a problem. It wouldn't be quite how I had intended it to be, but it would be successful and would still work.


      If I can fix the problem with the image sequence showing up to early, and of the tree and text movie clips being cut off, then this project would also be successful and it would be how I had wanted it to be.


      If you need clarification, let me know and I'll explain something better.


      I am not willing to provide a download link in this forum for my fla files, but I can email them to you if you would like a look. I just don't want someone to be able to find them and take them by doing a google search.


      I have uploaded two swfs though.

      The first is of the tree and text layers/movie clips working as they are supposed to. The second is of the image sequence (floor1, floor2, floor3) doing what it is supposed to.


      Text and tree: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg1.swf

      Floor1, floor2, floor3: http://glassoliverdesigns.weebly.com/uploads/1/0/6/5/10653451/tfg2.swf


      Notice how at the end of the text and tree swf, when the text stops the thing in the background keeps flashing. If that can keep flashing WHILE the images appear, then that would be great.


      TL;DR: I want the floor# flash to show up after the text and tree flash but I keep having problems and nothing I try is working properly.

        • 1. Re: Difficulties with movie clips and frames
          sinious Most Valuable Participant

          Very concise question, appreciate the screenshots. One thing that motion tweens don't always show very well is keyframes. Let me clear a few things up and see if it helps.


          Go back to what you wanted to do originally, which is copying the frames from one document to another. This is perfectly fine and to clear it up, it will also copy any library elements (images, clips, etc) that are required to copy those frames for you, so you do not need to import them yourself.


          To successfully copy frames (not symbols), select the first frame of the frames you want to copy, hold shift and select the last frame (alternatively double clicking anywhere in the blue motion tween should select it all as well). Now right-click and "Copy Frames". Now go into your new document, select a frame, right-click and select Paste Frames. You will see the same frames copied over, the blue representing the tween and keyframes came with it and you finally will notice all your images/etc were copied into your library.


          Now is a good time to manage the library clutter that was just copied in, if you're a clean freak like me.


          This process is the same, as you tried, for the other documents you want to copy in. If any resources match in name then Flash will ask you if you want to "overwrite" that library item. If you do that,  you will break one of your previous animations. Make sure that's not the case.


          The common gotcha here is not knowing how to slide frames over properly. If overwriting isn't the issue, this is what I suspect your problem is and as you expand/contract the timeline the keyframes aren't going with you.


          For example if I import 2 clips with fade in/out and move keyframes as you did I'll get something like this:




          Now moving them over I would be very careful to select all of the frames I want to move via the methods above. Click the first frame, hold shift and select the last frame, or double-click anywhere in the middle of the blue. The selection of frames:




          Now I simply drag my selected frames to the right, notice the keyframes stay as they should (the black dots):




          The animation plays as expected.


          Lastly I'm not sure if you've ever used the panel but you should really get used to the Motion Editor. This gives you control over easing as well as shows you an in-depth view of the keyframes that exist in a selected motion tween.


          At first this panel may look complex but it simply represents the basic properties you can animate. Any more properties you animate can be added in here. I moved the X, Y and Alpha properties of my object. So you can see over the frames 30-60 what I did. You can also adjust basic easing here.




          If your animations don't look correct you can select a motion tween, open the motion editor and verify the keyframes look correct. Scrub the timeline and look at the values you're interested in. Alpha for example, for you.


          If you don't see any keyframes when you scrub the timeline, you moved your frames over incorrectly and the keyframes probably exist in a different place and therefore it appears incorrect.

          • 2. Re: Difficulties with movie clips and frames
            MistPower101 Level 1

            Thanks for the reply!


            I've done everything you told me, but I am still having the problem of the image sequence interrupting the other movie clips. The flash keeps coming out like this: http://glassoliverdesigns.weebly.com//uploads/1/0/6/5/10653451/problem.swf


            I looked at the Motion Editor and it is extremely helpful. There seems to be no keyframes shown, however.


            This means that my frames were moved over incorrectly and the keyframes are in a different place, correct?

            I am unsure what I did incorrectly though. I also went back and checked and redid the image sequence, making sure I was sliding over the frames properly. After redoing it, it played properly, as it did before, and I copied and pasted those frames over to the other fla file, but the issue remained...


            I played around and made it so that each of the layers "lined up" and the frames weren't moved over for the floor# layers, therefore everything would play at once.


            Upon testing the flash, I found that "text" and "tree" are cut off after a few moments, the same way that they were interrupted in the above linked problem flash. I moved the floor# layers to be on top of the text and tree layers and tested the flash again, and the problem remained.


            This is what the flash looks like now. You can faintly see the text as it starts to appear.



            My conclusion was that the problem exists with the text and tree layers/movie clips somewhere, but they play correctly and without being cut off when they are by themselves, so I think that the problem is still with the floor# layers/movie clips. I am unsure of what I am doing incorrectly though. Likely, the problem is with the floor# frames being copied over.


            I then slid over the frames for the floor# layers, trying both with the layers under and over the text and tree ones, and tested the flash. The result is the same as this problem flash: http://glassoliverdesigns.weebly.com//uploads/1/0/6/5/10653451/problem.swf


            I wish I knew for sure where the problem was. It probably is with the frames being copied over, but I just don't see "where" exactly.

            • 3. Re: Difficulties with movie clips and frames
              WebXperience Level 1

              Make sure that the number of frames in the movieclip is the same duration as the time line it's placed on. Meaning if your movieclip's enter frames are say 45 frames, make sure that when you insert it into the timeline with your gif, that you have allowed the same 45 frames before the beginning of the gif.

              1 person found this helpful
              • 4. Re: Difficulties with movie clips and frames
                MistPower101 Level 1

                I had made sure of that a long time ago. I thank you for the reply though.

                • 5. Re: Difficulties with movie clips and frames
                  MistPower101 Level 1

                  I figured it out!

                  My problem was that I kept pasting the image sequence's frames onto the main timeline. I decided to experiment and put them in the tree symbol's timeline instead, and it worked. The results are different than what I wanted, but actually I like how it looks this way. I still need to tweak a couple things, but those are easy changes.


                  sinious, WebXperience, I thank you both so much for replying! I was at such a loss with this problem and you both helped me out. I've marked WebXperience's reply as helpful, and I'm marking sinious' as correct because it cleared up some things for me and it also made me aware of the existence of the motion editor pane, which I had never heard of before. 0_o I really should explore Flash more.


                  Again, thanks so much you two!

                  • 6. Re: Difficulties with movie clips and frames
                    sinious Most Valuable Participant

                    It's always best to keep things neat and tidy so I'd always put things in symbols. Glad you got it fixed, good luck!