• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

slide show play and stop

Participant ,
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

484

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

Community Expert , 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

...

Votes

Translate

Translate
Community Expert ,
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

Votes

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
Participant ,
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()?

Votes

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
Community Expert ,
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.

Votes

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
Participant ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

Can you show me how to do it

Votes

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
Community Expert ,
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.

Votes

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
Participant ,
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.

Votes

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
Community Expert ,
Oct 30, 2019 Oct 30, 2019

Copy link to clipboard

Copied

LATEST

i understand.

Votes

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