slide show play and stop

Explorer ,
Oct 28, 2019 Oct 28, 2019

Copy link to clipboard

Copied

I have done slide show with 52 pictures of me. I have made a start/stop button when you click on the picture. Is it possible to break slide show with two buttons in one backward and the other forward. I have done one such but it doesn't work but if I put there this.stop(); in the frame, the button that goes forward but not backwards works.

Views

280

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Oct 30, 2019 Oct 30, 2019
too much work for a forum.  but  setup: you would need to start a loop (eg, ticker) whenever you wanted to use your previous button.  you would need an array of the frames where the playhead should stop.  when the prev button is clicked you would then determine on which frame you would stop (based on the current frame and your array). you would start your ticker loop. in the ticker listener you would gotoAndStop on the currentFrame-1 (ie, the previous frame). in the ticker listener you would...

Likes

Translate

Translate
Adobe Community Professional ,
Oct 29, 2019 Oct 29, 2019

Copy link to clipboard

Copied

assuming you have your pictures assigned consistantly (ie, every frame or every 2nd frame or every 3rd frame etc), there shouldn't be any problem if you use:

 

this.gotoAndStop(this.currentFrame+n);  // next pic where n-1 is number of frames between pics you used

this.gotoAndStop(this.currentFrame-n);  // prev pic

 

p.s.  you should check if there are more and previous frames before trying to execute the code

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 29, 2019 Oct 29, 2019

Copy link to clipboard

Copied

I'll show you how I did with three pictures.

In pic1.jpg  I have the label beginn in the first frame.
In pic2.jpg pic2.jpg  I made a yellow circle in Lager_1 (Layer_1) with the instance name button1 that you see in the picture.
In pic3.jpg  you will see the codes that I have put in action.

 

I want you to be able to move backwards or forwards in the slideshow when it is in motion. Can I do this or do I have to this.stop()
Is there any difference between this.play() and this.gotoAndPlay()?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 29, 2019 Oct 29, 2019

Copy link to clipboard

Copied

that setup isn't conducive to use with a previous button.  it may be possible to get it to work, but generally it would need to be re-worked.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Can you show me how to do it

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

too much work for a forum.  but 

 

setup:

you would need to start a loop (eg, ticker) whenever you wanted to use your previous button.  you would need an array of the frames where the playhead should stop. 

 

when the prev button is clicked

you would then determine on which frame you would stop (based on the current frame and your array).

you would start your ticker loop.

in the ticker listener you would gotoAndStop on the currentFrame-1 (ie, the previous frame).

in the ticker listener you would check if that frame is the frame on which you want to stop.  

if so, remove the ticker listener.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

This you describe is too advanced for me. I'm a beginner in programming.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

LATEST

i understand.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines