Functions not working together

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!