3 Replies Latest reply on Jul 2, 2009 10:31 PM by kglad

    Frame reference within a clip within a clip


      this seems to be an almost universally puzzling question as I've not gotten any responses from any of the forums that I've posted on...


      Is it possible for me to have 1 movieclip consisting of multiple movie clips, in a .fla file, and reference specific frames of clips within a frame of the movie clip, from an outside .as file?


      In a .fla file I have a movie clip that consists of several frames, each containing a different movie clip to perform different actions of a character I am attempting to animate.  The basics of the code work fine, but now I'm trying to get into more detailed aspects of the characters actions and interactions and all the tutorials that I've come across thus far direct me to add various aspects of code throughout my animation which I feel would litter my program as this project grows.  My basic code is as follows


      class hero extends MovieClip
          variable definitions up here

          function onLoad()
              variable initializations here
          function onEnterFrame()
              if( Key.isDown(Key.RIGHT) )
                  _xscale = 200;
                  if( Key.isDown(Key.SHIFT) )

                      _x = _x + run_speed;

                  } else {
                      _x = _x + walk_speed;


      // more of that for the other carnal directions of the character's movement...

              } else if ( !Key.isDown() ){


      This works fine.  Beyond this, I have a frame with the anchor lable "Punch" which contains a movie clip consisting of 5 frames.  Is it possible for me to reference specific frames within the movie clip within this frame of the big movie clip?