Sliding Menus - Step Eight: Finished
Posted by : PhilS on Jul 29, 2008
Your first Movie Clip should now be sliding happily to the position that you want it. You may also wish to add additional Movie Clips so that one button moves more than one object. The instance name needs to be different and all references in the script will need to be changed to reflect this.
** A Final note: X and Y**
If you want your movie to move from left to right as opposed to up and down just change all the Y's to X's. With a little fiddling around you should also be able to move things on diagonals. To do this you will have to have a script for both the X and Y axis.
Have fun!
I hope you have found this useful.
Source: http://www.webwasp.co.uk/tutorials/101/index.php

1 comment
Add comment
Saulgarber
It's wanderful, I made it with pictures and it work nice.
But I'm trying to make the image zoom and move in different places with two buttons and it goes to the same place (X & Y)... I tried with this:
Button 1
on (rollOver) { yTargetMC = 80; xTargetMC = 80; _xscaleMC = 400; }
Button 2
on (rollOver) { yTargetMC = 60; xTargetMC = 60; }
Movie Clip
*onClipEvent (enterFrame) { yMC = getProperty(_root.MC, _y); moveMC = _root.yTargetMC - yMC; setProperty(_root.MC, _y, yMC + (moveMC/10)); }
onClipEvent (enterFrame) { xMC = getProperty(_root.MC, _x); moveMC = _root.xTargetMC - xMC; setProperty(_root.MC, _x, xMC + (moveMC/10)); }
onClipEvent (enterFrame) { xMC = getProperty(_root.MC, _xscale); scaleMC = _root.xTargetMC - xMC; setProperty(_root.MC, _xscale, xMC + (scaleMC/40)); }
onClipEvent (enterFrame) { yMC = getProperty(_root.MC, _yscale); scaleMC = _root.yTargetMC - yMC; setProperty(_root.MC, _yscale, yMC + (scaleMC/40)); }*
It didn't work fine... Could you help me?
Tx Saul
#  /  PM  /  posted on Apr 15, 2011