Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : controling horizontally scrolling movie clip


el scifo
5/10/2004 8:57:15 PM
Hi,
ive run into a bit of a problem with a flash project im working on and could
really do with some help. I have a movie clip which I want to scroll
horizontally when a user clicks on a button. this horizontal scrolling image is
broken up into five different images each of which corresponds to a section of
my site which tween and scroll sidewards. each of these photos has a stop
action attached to the frame when it has scrolled into its correct position.
when a user clicks on a button i want the movie clip to scroll through the
images until the image stops on the corresponding picture for that button. if
it was the case that i wanted the movie clip to just go directly to the
corresponding frame its no problem a simple gotoandstop action will look after
that however i want it to scroll through each of the pics until it arrives at
the correct one instead of jumping directly to each image.
the problems arise when i attach the necessary stop action at the point where
the correct image has scrolled into position. so what happens when i attach an
action to my button which initiates the scrolling in the movie clip the clip
gets stuck on the next stop action it encounters.

is there any way that i can set up my movie clip to scroll in the way i want
it to?
i have considered that there may be a way to direct the movie clip to scroll
through its frames and direct it to stop on a particular frame without using
stop actions on the frame in the movie clip but as my actionscripting is a bit
ropey i don't know if thats possible.
if anyone knows a script i could use to do this or could recommend another
approach i would be really greatful.

thanks,
el scifo


oh yeah forgot to add im using mx
tralfaz
5/11/2004 11:28:06 PM

[quoted text, click to view]

You could set a stop variable on the buttons like this..

// button4
on(release)
{
st = 4;
play();
}

// button5
on(release)
{
st = 5;
play();
}

etc..


//on the timeline keyframe for image 4
if(st == 4)
{
stop();
}

//on the timeline keyframe for image 5
if(st == 5)
{
stop();
}







AddThis Social Bookmark Button