# Recycle-Code

**URL:** <https://forum.kirupa.com/t/recycle-code/123317>\
**Category:** Uncategorized\
**Created:** [September 22, 2004, 3:18pm UTC](https://forum.kirupa.com/t/recycle-code/123317 "2004-09-22T15:18:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesignx](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@thesignx](https://forum.kirupa.com/u/thesignx)\
**Post date:** [September 22, 2004, 3:18pm UTC](https://forum.kirupa.com/t/recycle-code/123317/1 "2004-09-22T15:18:55Z")

</div>

Hi, there all…

So, is there anybody out there that can help me or explain how to re-use some code over and over again with out placing it over and over on a frame-script?.. this is the code:

//  
this.onEnterFrame = function() {  
if (scrollmessage\<\>false) {  
if (\_root.backgroundmap.hitTest(\_root.\_xmouse, \_root.\_ymouse)) {  
if (Key.isDown(Key.CONTROL) || Key.isDown(Key.SHIFT)) {  
usecontrol\_mc.gotoAndStop(1);  
}  
usecontrol\_mc.gotoAndStop(“appear”);  
} else {  
usecontrol\_mc.gotoAndStop(“desappear”);  
}  
navmapwindow\_mc.mappointer\_mc.\_x = -(gallerymapmanager\_mc.banderasbay\_mc.\_x/(17.4)-10);  
navmapwindow\_mc.mappointer\_mc.\_y = -(gallerymapmanager\_mc.banderasbay\_mc.\_y/(17.7)-10);  
}  
};  
//  
stop();

and I have to use it in a bout 60 different frames! 😑

Thanks in advance…

P.D. in case you see bad syntax I will appreciate your suggestions. :love:
