3 Replies Latest reply on Nov 20, 2009 12:48 PM by Ned Murphy

    Play movie clip on frame

    iinfinity8

      I am using Flash CS4 and i have made some short movie clips. I want one of them to play on frame 24 once and then the next on frame 48 ect. How would i do this?

       

      Thank you in advance,

      Ben

        • 1. Re: Play movie clip on frame
          Ned Murphy Adobe Community Professional & MVP

          Your posting could be interpretted at least a couple ways, so I'll try for one of them... Give your movieclips instance names via the Properties panel, and in an actions layer, on the frame you want one to play, add a keyframe and in it add the code: mcName.play();  where mcName is whatever instance name you assign to the movieclip

           

          The preceding assumes you have a stop(); command in the first frame of each movieclip.

           

          If that doesn't agree with the scenario you intend, try explaining the details again.

          • 2. Re: Play movie clip on frame
            iinfinity8 Level 1

            Yes thats exactly what i want , however it is returning this in the output window;

             

            TypeError: Error #1009: Cannot access a property or method of a null object reference.

            at Untitled_fla::MainTimeline/frame24()

            • 3. Re: Play movie clip on frame
              Ned Murphy Adobe Community Professional & MVP

              First, you have to be sure that you assign the instance names to the movieclips via the Properties panel.  Then you need to be sure to name them in any keyframes that they exist in on the timeline.  So if you happen to transition stuff into view with a tween or something, be sure to have the instance names assigned at every keyframe.  Lastly, you need to be sure to use the same instance names in the code.

               

              Somewhere in what I just described is the solution to the problem.