Monday, December 28, 2009

Adobe flash: what actionscript do I use to make a button move to next/previous image?

I found a tutorial online to make a slideshow:http://www.layersmagazine.com/flash-slid鈥?/a>





but the actionscript doesn't work!


I've tried various alternatives but none of them work.





So basically I need actionscript that will allow me to click a button multiple times, and each time it will go to the next frame of the slideshow.





Thanks in advance for any help!Adobe flash: what actionscript do I use to make a button move to next/previous image?
an even simpler answer than the guy above: if you have a start screen without the slide but a button to start then firstly name your first slide as slide1 (click on slide one frame and in the properties at the bottom there should be an area for the name tag of the frame) then on the button of the start screen put this code: on(release){


gotoAndStop(';slide1';)


}


THEN on the button on slide 2 put the same code but change it to slide2 (also change the slide twos name tag to match[ slide2 ]) THEN keep doing that but change them to slide3 then slide4 then so on.. hope this is understandable.. ALSO if your animation slide thing starts with an image as slide1 just do the same code, well.. basically: frame 1 has a button to next slide, on the button is that code above, but on the slide1 the name tag is slide1 so the code knows where to go(which is the name tag slide1) ... OR AN EASIER WAY: frame 1 has slide1, the actionscript2 on the button is on(release){


nextFrame();


}


and on the next frame should be your next slide. if you want a backward button just change it frame nextFrame() to prevFrame()








HOPE THIS HELPED!Adobe flash: what actionscript do I use to make a button move to next/previous image?
It's very simple.


Select the button and enter this actionscript:





slideshowFrame = 0; //a variable for the frame number


on(release)


{


slideshowFrame += 1;


_parent.-----YOUR MOVIE CLIP NAME---.gotoAndStop(slideshowFrame ); //YOUR MOVIE CLIP NAME = change to the name of the slide show movie clip


}





This should work (I think) ;)

No comments:

Post a Comment