This should be your final outcome. Click on the buttons and see the images slide. You can slide anything.....images, text, or even other movie clips. Notice in this example the images are actually buttons with links:
This
code lies directly on the MC you wish to slide (in this case it's
a row of button images inside a MC). Be certain to name your movie
clip (in this example we named it "webthumbs")
_x defines the starting position of the MC at load time. Then we subtract
or add ,depending on direction , the number of pixels we want the
MC to move.
| onClipEvent
(load) { Scene1_x = _x; Scene1_y = 0; Scene2_x = _x-(-92); Scene2_y = 0; Scene3_x = _x-(-184); Scene3_y = 0; Scene4_x = _x-(-276); Scene4_y = 0; //a
variable "Scene" is being defined …. Scene1 x coordinates
equals _x //
here target is defined to equal the value of the variable "scene" |
The code below lies on the buttons which activate the sliding effect.
Use different numbers to move the MC to the different locations designated
above.
This
would be the code for button 1 (in our example "effusion solutions"),
You would then change the "1" to a "2" for the
second button, etc.
note: our MC is named "webthumbs"
| on
(press) { webthumbs.scene = "1"; } |




