Skip navigation
matt0400@aol.com
Currently Being Moderated

Does each timeline keyframe = new object?

Apr 14, 2012 9:17 AM

Hi guys, starting to test my game and realizing I may have made a huge error in the design. I have a "hit tester" MovieClip in the timeline with hundreds of keyframes (all given the same exact instance name), moving it along with the character's animation.

 

I'm debugging and realizing thousands of instances are being created somewhere.

 

Is each keyframe of a MC instance in the timeline the equivalent of coding "mc1:MovieClip = new MovieClip()" ?

 

This problem is really bringing my project to a stand still so any help is incredibly appreciated!

 

Thanks

 
Replies
  • kglad
    72,372 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 14, 2012 9:32 AM   in reply to matt0400@aol.com

    yes.

     

    just because those movieclips have the same instance name or reference name, doesn't make them the same movieclip.

     
    |
    Mark as:
  • kglad
    72,372 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 14, 2012 3:04 PM   in reply to matt0400@aol.com

    create the initial keyframe that will contain your movieclip.  assign its instance name.  now add as many keyframes as you like (AFTER that intial keyframe).  do not remove/replace your movieclip on any keyframe or thereafter you will lose your movieclip reference.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points