PDA

View Full Version : onmouseover question



darkus
August 18th, 2007, 12:33 PM
My appologies in advance for this question, as i'm sure its so basic its laughable.

Im using Adobe flash CS3 to make a new flash movie and i've been reading all the tutorials I can.

So far I have 4 objects each in their own layer that i've gotten to move across the screen from outside the screen on the left, to the center of the screen using a motion tween.

Now I want to have the flash stop at this point and listen for a mouseover.

If the mouseover is on object 1, I want to make object 2-4 move back to the left of the screen.

How do I do something like this?

I can figure most stuff out, but a hint in the right direction would be much appreciated. Basicly how can I make an object in another layer begin a motion tween when another object is onmouseover'd. ?

Thanks!

Michael Chen
August 20th, 2007, 12:45 AM
Most likely you'll need some kind of ActionScript. You can start with something like this...



object01_mc.addEventListener(MouseEvent.ROLL_OVER, objOnRollOver);

function objOnRollOver(e:MouseEvent):void {
// Actions to move objects 2 ~ 4 back to left.
}


Have a look into the Tween class if you want to move the objects dynamically.

Hope that helps.