How do you make a picture move on rollover

Hi, i am having a problem, I have a picture that appears from the left, and then a set of buttons from the right, when the user rolls over a button, i want the picture to move left. Would anyone know how i would go about doing this?

of course !

you’ve got multiple choices here…

simplest one:
make a movie clip of your image going left to right (or however you want it) and on the first frame of that movie clip write


stop();

do the same thing at the end of the movie clip so it doesnt go back to the beginning
you can use easing to, to make the image look like it slows down

let’s say that movieclip is called TheMovieClip and is on the top level (its path is _root.TheMovieClip)

your buttons should be coded like this:


on(release){
_root.TheMovieClip.play()
}

ok now a bit more complicated:

you have the image, still a movie clip but not animated, I’ll call it NotAnimated, its path is _root.NotAnimated

this is what the coding of the button should look like:


on(release){
for(i,i<101,i++){
_root.NotAnimated._x += i*5;
}
}

now i’d go for the simpler version because the more complicated one means that you have to calculate how far it should go… (here it goes 5*100 = 500 pixels right from its original position)

hope it helped…

okay, i think u didn’t quite get what i meant. Okay

the image comes in from left to right , and it is now sitting in the middle of the screen.

when the user rolls over a button, the image goes to the left, (where it came from), to allow room for some text that i want to put.

I can’t think of a way to do it, u probably know.

how did you make it come left to right ?

I just tweened the image from left to right inside a movie clip, what i want is , when the user rolls over a button, for the image to go back to where it came from!