Apply function to different MC's simultaneously?

Hey guys,

Sorry if this has been answered before - I have no idea where to begin with this so didn’t know what to search on the forum.

Basically:

  1. I have 2 objects (Object1 and Object2)
  2. I wish control them using the same code (the 1 set of code not 2)

Something like…

stage.addEventListener(Event.ENTER_FRAME, Drop);
var dropspeed = 3;

function Drop(event){

???.y = ???.y + dropspeed;

}

I suspect it MAY have something to do with creating a class that has both objects in it and applying the function to the class but I tried and Flash wouldn’t allow me to have 2 objects with the same class.

Like I said I pretty much have zero idea on how to go about doing this so if anyone can point me in some sort of direction that’d be awesomes

Thanks guys.

Here’s a method I use quite often.
Stage has three movieclips: button, mc1, mc2.
The script basically causes mc1 and mc2 to scale-down on rollover and scale-up on rollout.

stop();
import gs.TweenMax;
import fl.motion.easing.*;

button.addEventListener(MouseEvent.MOUSE_OVER, rollover, false, 0, true);
button.addEventListener(MouseEvent.MOUSE_OUT, rollout, false, 0, true);

function rollover(event:MouseEvent):void {
	TweenMax.allTo([mc1, mc2], .5, {scaleX:.1, scaleY:.1, ease:Back.easeIn, overwrite:false});
}

function rollout(event:MouseEvent):void {
	TweenMax.allTo([mc1, mc2], .5, {scaleX:1, scaleY:1, ease:Elastic.easeOut, overwrite:false});
}