# Functions not working together

**URL:** <https://forum.kirupa.com/t/functions-not-working-together/67812>\
**Category:** Uncategorized\
**Created:** [October 19, 2004, 9:19pm UTC](https://forum.kirupa.com/t/functions-not-working-together/67812 "2004-10-19T21:19:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ballerina](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@ballerina](https://forum.kirupa.com/u/ballerina)\
**Post date:** [October 19, 2004, 9:19pm UTC](https://forum.kirupa.com/t/functions-not-working-together/67812/1 "2004-10-19T21:19:02Z")

</div>

I have these two functions which both happen on an onEnterFrame event;“basichittest” and “photo”. They each work by themselves, but not together

I attached the fla file  
I commented out lines 6-10 and line 58.

I want the red dot “photodetector” to get brighter as the mirror slides to the right. I also want the beams of light to bounce back and forth when the drag happens.

If I uncomment the offending code, the beams no longer bounce, but the dot behaves the way I want.

Can I only have one function on enter frame?  
I’m pretty bad at actionscripting so I need help. please.  
thanks!
