i have a flash file which has three images and three butoons. initially the images arent visible in the file, only the buttons will be visible. when a particular button is clicked, one of the images slides out from the right side. When another button is clicked, the current image slides out and the other image slides in. The method in which i want the image to slide in is shown in the attached fla file. The file has shown the sliding using only one image. It's a simple problem thats cause me a great deal of trouble. Could someone help me out please?
Hi
I have manipulated the FLA example you sent to show you a way how...
This way the images can be loaded from an external folder so you can update easily....
First i gave the sliding movieclip the instance name of ....slider.
Then i created an empty movieclip and placed it inside this sliding movieclip to the top left of stage...giving it an instance name of ...holder.
There are now 3 buttons that call some functions i have set up on the main timeline actions.......
A function with an interval included for the loading goes something like this:
code:
getPic1 = function () {
_root.intSlideToX = 980;//move slider to right first
function waitPic1() {
//next ..the variable myInterval tells us how long to wait before it clears
clearInterval(myInterval);
//when it clears it then loads a pic into the holder clip
loadMovie("pic1.jpg", _root.slider.holder);//notice the path
_root.intSlideToX = 302;//moves slider to the left
whichPic = "Picture 1";//tells us title of pic
}
// here is where it actually triggers the function after 1 second
myInterval = setInterval(waitPic1, 1*1000);
};
The images are jpgs named (pic1,pic2,pic3)....and for convenience are all the same size....these are saved in the same folder as the FLA....so they can be loaded when the SWF is tested.
Let me know how you get on and if you need help!
Here is the FLA updated....and saved as MX version