8 Replies Latest reply on Nov 30, 2012 9:40 AM by sinious

    Why arent my motion tweens working?

    pandatte Level 1

      I am trying to make a flash clickable movie, but my two motion tweens do not work. One of them is a fading tween, the first tween i set the alpha to 0, on frame 15 I set the alpha to 100. It works when I click Play but not when I Test Movie. It just stops on the alpha 0 frame. The second motion tween is a left to right text. It is supposed to be on the left side at first, and then slides to the right. It is the same, clicking play works but text movie doesn't, it just stops on the frame where the text is still on the left.

       

      I use flash 2004

        • 1. Re: Why arent my motion tweens working?
          kglad Adobe Community Professional & MVP

          attach a screen shot of your main timeline.

          • 2. Re: Why arent my motion tweens working?
            pandatte Level 1

            flash thingy.PNG

             

            layer 15 is the sliding text where the Text layer is just... unmoving text. I deleted the first motion tween by accident, so I'll just show you the sliding tween.

             

            Am I doing anything wrong? -_-'

            • 3. Re: Why arent my motion tweens working?
              kglad Adobe Community Professional & MVP

              you probably have an error in your code or a stop() on one of your frames.

              • 4. Re: Why arent my motion tweens working?
                sinious Most Valuable Participant

                You used the same frame label name on multiple layers. That will get you confused in general and could cause a code error if you reference it. You should always use unique frame labels. Think of them like naming files in the same folder to the same name. The OS will stop you. Flash won't (just incase you only use them for human reasons) but code will error.

                 

                If you're getting any code errors they will appear in your console output with the frame and line number they occured on. Pay attention to those. Otherwise it's like kglad said, you put a stop(); in there.

                • 5. Re: Why arent my motion tweens working?
                  kglad Adobe Community Professional & MVP

                  and, one more thing, never start a frame label (or any other non-numeric object) with a number.

                  • 6. Re: Why arent my motion tweens working?
                    pandatte Level 1

                    @sinious @kglad

                    I changed the frame label names, so like frame 1 of the Text Layer is anext1, frame 2 is anext2, and frame 1 of the Character Layer is bnext1, frame 2 bnext3, etc but now when I click the buttons don't lead any where

                    • 7. Re: Why arent my motion tweens working?
                      kglad Adobe Community Professional & MVP

                      it doesn't make any sense to have different labels for the same frame number on different layers.  layers don't even exist in your swf.

                       

                      so, whatever you're trying to accomplish by using labels on the same frame of different layers isn't going to work.

                      • 8. Re: Why arent my motion tweens working?
                        sinious Most Valuable Participant

                        Frame labels are confusing you,  you should just remove all of them. Your document is small enough to just use frame numbers. Notice how frame numbers are the same no matter what layer you're on? That's how frame labels work. You can give a single frame, say frame #15, 19 different layers with 19 different frame labels but all 19 labels only do the same thing, point to frame #15.

                         

                        Try coding your buttons to use frame numbers before you even touch the frame labels. If that works for you, then remove all those useless frame labels. Labels help if you change your timeline a lot by adding and removing frames. Otherwise they're just confusing you.

                         

                        To go to a specific frame number, put your playhead on that frame, check what frame number it is and use code like so:

                        gotoAndPlay(5); // play frame #5

                         

                        If on frame #5 you have a script with stop(); in it then that will halt the playhead, so don't put one there unless you need to halt on that frame. If you need to sometimes halt on that frame and other times not, remove the stop(); and use the correct command to stop or play on that frame.

                         

                        e.g. Goto frame 5 and Stop (no stop(); script needed):

                         

                        gotoAndStop(5);

                         

                        e.g. Goto frame 5 and Play:

                         

                        gotoAndPlay(5);