Sliding Menus - Step Six: Test the Movie
Posted by : PhilS on Jul 29, 2008
If everything is correct the menu should now slide in as the movie loads. You may want to check that the stop point and speed are correct.
Go to: **Control - Test Movie **(Ctrl Enter)
**Note**: You should now see the Movie Clip slide in from the bottom.Close the Test Window:

To change the speed you need to change the division in the above line (Step 5, line 4). If you make the number 10 higher the speed will be slower. If you make the number 10 lower the speed will increase.
To change the location of where the Movie Clip stops you need to change the number in the action script in frame one: yTargetMC = If you make the number 100 higher the Movie Clip will slide further down the page. If you make the number 100 lower it will slide to a position higher up the page.
Note: If the target number is too high or too low you may find that your Movie Clip either does not move far enough to enter the Stage or move right across the Stage to stop too far down to be visible.
Note: You may use negative numbers: yTargetMC = -100; or positive numbers : yTargetMC = 100;

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