PDA

View Full Version : question about a code


jeff wysocki
09-28-2003, 03:33 PM
this code is for a slideshow of pictures in flash mx. somewhere in these lines of code, it is telling the image to align to the far left of the stage. does anyone know which code tells you this, and is so, how can i get the image to be about 50 pixels from the left. heres the code...

on ClipEvent(load) {
picno=5;
totalpics=5;
}
onClipEvent (enterFrame) {
//the picture number times the width of the pictures
//minus one half the width of the pictures
newdist = (((picno*(_width/totalpics)-(.5*_width) - _x)) / 3);
_x = _x+newdist;

}

theablefew
09-28-2003, 05:01 PM
do what ?
you want to space images ??
whats the desired result?

jeff wysocki
09-28-2003, 06:24 PM
lets say you have 10 layers on your timeline in flash mx. each layer has a picture that is tweened to fade in and out, so that when you play the timeline, it fades each picture in and out, sort of like a slideshow. i figured out how to make a "play" button that will play the timeline, and stop on each picture, so that each time you press the play button it plays the timeline and the next picture fades in and out. my problem is that i want to make a "previous picture" button that when pressed it will go back to the last picture, and each additional time it is pressed, it will keep going back picture by picture to the beginning. an example of this is at www.msn.lexus.com thanks for your time.

theablefew
09-28-2003, 07:30 PM
you should write a function for it.. instead of making it timelined based..

a fadeout / fadein

timeline based would be a pain in the ass..

ill post something in a min..
i made one for loading images dyanmicly ..

give me a min

theablefew
09-28-2003, 07:39 PM
here ya go