How can i add an actionscript on the main movie that will control an external swf:(

help me guys, i have two movies, mainmovie.swf and loaded.swf…

loaded swf has movieclip inside it named button1.
i want to create an button1.onRelease = function(){} but instead of writing the actionscript on the loaded swf movie. i added it on the mainmovie.swf…

is this possible, i will control the external movieclip by adding its actionscript in the mainmovie… the loaded.swf doesnt have actionscript, all of my as will go on the mainmovie… help please:(