Seamless Button

Hello guys, I’m trying to make a seamless button for the menu. The problem is that, I want it to be controlled remotely by AS. I only know how to do it directly to the MC. Is there a way to place AS on the main timeline?

The current AS I’m using is the following : ( I didn’t do it myself )
this.onRollOver = function(){
rewind = false;

this.onRollOut = function(){
rewind = true;

this.onEnterFrame = function(){
if(rewind == true){