# MX2004PRO\[AS2.0\] using classes to set interaction between movieClips

**URL:** <https://forum.kirupa.com/t/mx2004pro-as2-0-using-classes-to-set-interaction-between-movieclips/257063>\
**Category:** flash\
**Created:** [April 9, 2008, 9:40pm UTC](https://forum.kirupa.com/t/mx2004pro-as2-0-using-classes-to-set-interaction-between-movieclips/257063 "2008-04-09T21:40:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gar\_Fonz](https://avatars.discourse-cdn.com/v4/letter/g/df705f/32.png) [@Gar\_Fonz](https://forum.kirupa.com/u/Gar_Fonz)\
**Post date:** [April 9, 2008, 9:40pm UTC](https://forum.kirupa.com/t/mx2004pro-as2-0-using-classes-to-set-interaction-between-movieclips/257063/1 "2008-04-09T21:40:02Z")

</div>

I was wondering if anyone could offer some tutorials or advice that would show me how to develop a movieClip class that would allow the id of the movieClip(that was placd on the stage with attachMovie) to be transfered to some other code on the main timeline, when a hitTest becomes true?

Normally, I would just put the code that I wanted to activate with the hitTest becoming true in the instance of the MovieClip, but since I am dynamically loading the movieClips, I won’t have a chance to place any code on the instance.

I just thought of another way that I could make the samething happen without classes, although I would still like to learn how to incorporate classes in this case because I believe that it will be more efficient.  
Any help would be greatly appreciated :thumb:
