PDA

View Full Version : image slide scroller


slaven
07-31-2005, 10:06 AM
hello,

i am working on an image slide scroller a have some problems.
The slide show is simple, the viewer clicks on a button and an image scrolls to the center of the screen. So i have made a MC of a 3 images lined up side by side and a 3 buttons for jumping to
particular image.

for now the image mc is static but i want to make it moving from right to left but still to be able to use my buttons like before.

the problem is when i give an action script to the image mc to move, something like

onClipEvent(enterFrame) {
speed = 2;
this._x -= speed;
}

the buttons lose their accuracy because the image mc is moving and the buttons do not
jump to the image like before because that image is now moved away.

the AS for the buttons:

on (press) {
with (mySlider) {
picno=3;
}

in this example i have 3 images so the next button would have the "picno=2"
and the last one "picno=1"

the AS for the image MC:

onClipEvent(load) {
picno=3;
totalpics=3;

}

onClipEvent (enterFrame) {

newdist =
(((picno*(_width/totalpics)-
(.3*_width) - _x)) / 3);
_x = _x+newdist;
}



tnx in advance

Slaven

Headshotz
08-02-2005, 09:38 AM
I could do this if you post the .fla

:)

slaven
08-03-2005, 08:58 AM
damn!
I am out of the country for a few days, i will post it when i get back
tnx a lot!

Headshotz
08-03-2005, 09:06 AM
That's fine.

I just find working on the flash file to be easier then trying to put together an imaginary flash file in my mind... :)

slaven
08-17-2005, 10:15 AM
here you go,
one more time, the pictures should move from right to left, and when you click on the buttons (01,02,or 03) you can jump from one to another and so on..

tnx

Headshotz
08-18-2005, 08:38 AM
Thank you, I will have it up in a day from when I posted this!