6 Replies Latest reply: Jun 22, 2012 11:15 AM by adninjastrator RSS

    Make a blinking light

    MARKARKARK Community Member

      Hello,

       

      I am trying to make a blinking light on keyframes of a project.  The project talks about this blinking light asks questions concerning this blinking light. I have a video playing at frame 10 on another layer.   I tried to put a still of the light off on frame 10, then the light on at frame 13, then off again at frame 15.  I then put classic tweens between the frames so 10 would tween to 13 which would tween to 15.  In frame 15 actionscript 2.0 I wrote "gotoAndPlay (13)"  I need it to go to 13 so it doesn't start my video again which is on frame 10.

       

      The problem is, when I put the tweens in, it disables the image on frame 13.  So it appears the lights are off when played. 

       

       

      My project is in actionscript 2.0.

       

      Thanks for your help.

       

      Mark.

        • 1. Re: Make a blinking light
          Ned Murphy MVP

          If these are images, there should not be any need to tween between them... you cannot tween one image into another

          • 2. Re: Make a blinking light
            MARKARKARK Community Member

            Okay,  but is there a way to make it work doing something different?

            • 3. Re: Make a blinking light
              adninjastrator Community Member

              Create the blinking light as a separate movie clip... a frame or two of the light on, then a frame or two of the light off. No Tween... rather a "hard cut" from on to off.... no stop action at the end and the blinking light will recycle.

              Then add that movie clip into the main timeline as needed.

              Adninjastrator

              • 4. Re: Make a blinking light
                MARKARKARK Community Member

                Hello!!!

                 

                You had helped me the other day. Thank you again.  I'm sorry, I am still learning the basics.  I have never created a movieclip.  I took my still of the light off in a seperate project just to test and put it in frame 1.  I then took a still of the light on and put it in frame 5.  I extended my frame to frame 9 to give it a little space.  Selected both frames and converted to symbol.  I chose movieclip.  When I tested this it worked fine.  When I went back into my original project and did the same it did not work and would not play the video I have on another frame. 

                 

                Thanks again,

                 

                Mark. 

                • 5. Re: Make a blinking light
                  MARKARKARK Community Member

                  Thanks for your help, I figured it out.

                  • 6. Re: Make a blinking light
                    adninjastrator Community Member

                    To create  blinking light movie clip:

                    1. create a "light on" image (in another program) the exact pixel dimensions that will be used in Flash.

                    2. create a "light off" image (in another program) the exact pixel dimensions that will be used in Flash.

                    3. import both images into the Flash Library

                    4. in your main Flash .fla, click "Insert" in the main menu, then "New Symbol", then choose the "Movie Clip" type (do not crate the movie clip in the main timline).

                    5. Now create your on-off blinking light in this movie clip. It has it's own timeline, layers, etc. and is completely separate from the main time fime.

                    6. Movie clip will now appear in the Library (it is not on the stage).

                    7. When you want to add this mc to the main time line, create a new keyframe (F6) and drag/drop the movie clip into the frame on the maine timeline where you want it.

                    8. give that mc an instance name down in the Properties panel.

                    Now you have a working mc that can be incorporated into the main timeline as needed.

                    When timeline gets to the frame with the video, remove the blinking light mc if you want, or leave it on.

                    Best wishes,

                    Adninjastrator