24 Replies Latest reply on Aug 30, 2016 10:11 AM by jbowden

    Stop triggers ignored.

    100michaelmcleod100

      Hello everyone,

       

      I seem to be having a problem many nubies do.

       

      I open a file.

      At 2sec I put a red square.

       

      I also put a trigger and select "stop" from the side menu in the action window (so this problem isn't with coding, I'm not entering anything myself but using the provided code)

       

      I also put the word "circle" on the stage with  a "sym.play(2.1)" to continue the action after i click on the word circle.

       

      I put a grey circle at 2.5

       

      after the circle would appear (at 2.5), I wanted the entire animation to stop.

       

      So I put another trigger, after the circle appears, again from the menu provided.

       

      Of course the result of this is that the animation pauses and waits form me to click the word "circle" then proceeds to show the grey circle;

      but only for a milisecond before looping back to the beginning of the animation (presumably because it reached the end and started over as usual)

       

      my question is: why doesn't the second trigger  - sym.stop(); -   stop the animation instead of letting it reach the end? I've tried putting specific numbers in the parenthesis, also tried making labels

      and using them in the parenthesis. Also tried using - play(); -    and   - sym.play(); -  with numbers and labels to create loops to endlessly stall the animation as a pseudo stop.

       

      all to no avail. After the first trigger that pauses it at the red square, there is no stopping this train, it always reaches the end and loops (which i know the loop always happens there.)

       

      Anyway, I can't continue learning this awesome program until I'm sure of how to stop. (also been frustrated with "Play from" functions relating to audio files, but that's a whole 'nother sandwich.

       

      Thanks for your thoughts.

      MD

        • 1. Re: Stop triggers ignored.
          100michaelmcleod100 Level 1

          BTW, I don't see any red warnings in the lower right of the screen (as I shouldn't being that I'm not entering any code myself besides numbers in the parethesis for location; but using the provided snippets.)

          • 2. Re: Stop triggers ignored.
            100michaelmcleod100 Level 1

            and obviously I don't know how to ad to my question. LOL, These are NOT the correct answers to my problem, ha.

            • 3. Re: Stop triggers ignored.
              subbbace Level 1

              try converting the red square into a symbol,then create the animation with in the symbol. im not to sure if i understand what your saying tho.but put a stop trigger on the main stage so it stops at the red square,then in the square symbol will be another time line to animate separate from the stages time line with in the symbol you've created . theres one way of doing it. but still im not to sure what your trying to explain.. i built this website.. it will only work in chrome and safari due to the sound files but if you can point out what your talking about in my page i could explain how i did it.  www.trebaltek.ca

              • 4. Re: Stop triggers ignored.
                100michaelmcleod100 Level 1

                Hey, thanks for the reply.

                 

                The red square works and the word "circle" works too,

                I play the animation, the red square shows up with the word "circle" next to it. The first - stop(); - trigger stops the animation at 2 sec (right as those items appeared)

                I click the word "circle" and the animation plays again and a grey circle appears .

                all is good until then.

                 

                but a second - stop(); -  trigger just does not stop at all, and the animation should stop and just show the word "circle" the original red square and a new grey circle we haven't seen until then; but it blows past all that in a half second and speeds by the trigger that is supposed to stop it and plays to the end and then automatically loops back to (0).

                 

                I just can't figure out how to stop the animation after the grey circle appears, that is the last thing that happens on the time line, then I inserted the - stop(); -

                 

                before the last frame of the animation to stop it; but it never has.

                 

                Any thoughts appreciated.

                MD

                • 5. Re: Stop triggers ignored.
                  100michaelmcleod100 Level 1

                  This is interesting (to me the ultimate nube).

                  For kicks, I took out the first  - stop(); -  trigger to see if the animation would just play start to finish and continuously loop (since it insists on looping)

                  When I took out the only working stop, the animation plays beginning to end and then stops on it's own.

                   

                  This may seem simple to everyone else, but I can't begin to guess how everything works until I find consistency in behaviour.

                   

                  1. With one stop, it stops then when you click it ignores the second stop and instead loops to the beginning starting over and over.

                   

                  2. with no stops, it plays once and stops.

                   

                  I don't understand, in the real world, stop means stop, not loop.

                   

                  ????

                  • 6. Re: Stop triggers ignored.
                    subbbace Level 1

                    are you using stop(); only.

                     

                    try creating a label were you what it to stop then add a trigger there aswell..

                     

                    then with in the trigger type the label name between the quotations . you have to keep the quotations when using labels or they wont work    sym.stop("");

                     

                     

                    when using labels and stop at use  sym.stop("");

                     

                    when using just stop.. the code is sym.stop();

                    • 7. Re: Stop triggers ignored.
                      100michaelmcleod100 Level 1

                      Ok, I checked the action on the word "circle" and it was - sym.play(2.1); -   (to play after the first stop when "circle" is clicked)

                       

                      I changed it to just  - play(); -  and everything works.

                       

                      One question left: When an animation in Edge plays start to finish normally with no triggers.......is it supposed to loop back to the beginning endlessly,

                      or is it normal for it to just end in a stop?

                       

                      Bear with me on this pre-k question, I know how obvious this sounds; but my results on this simple test have been so bizarre and unreadable

                      that I have gimble lock and just want to know what normal behavior is in this program.

                       

                      To Loop automatically or not to loop automatically, that is the question.  Which is normal for edge animation that reach the end.

                      Thanks again all your wizards out there!

                      MD

                      • 8. Re: Stop triggers ignored.
                        subbbace Level 1

                        i noticed you said it looped.. ive never had it loop it stops at the end of the animation.unless you have a trigger that says play from (0); at the end.but when your animation is done.. it should just stop..unless you have some effect way down the time line it will continue to play untill theres nothing left on the time line to play ..im still lerning too. where all on the learning curve..

                        • 9. Re: Stop triggers ignored.
                          jbowden Adobe Employee

                          Hi michael,

                           

                          100michaelmcleod100 wrote:

                           

                          Ok, I checked the action on the word "circle" and it was - sym.play(2.1); -   (to play after the first stop when "circle" is clicked)

                           

                          I changed it to just  - play(); -  and everything works.

                           

                           

                           

                          Not sure I understand exactly what you wanted to happen here, but the play() method takes one of three possible arguments: empty (which means just play), a number (in milliseconds), or a label (as a string) - both of which mean play from here. In the above example, your telling the browser to play the timeline from 2.1 milliseconds. Perhaps you meant play from 2.1 seconds? If so, that would be sym.play(2100);. For more information about the play() method, refer to the Adobe Edge Animate CC Javascript API:

                           

                          Adobe Edge Animate CC JavaScript API

                           

                          Or were you trying to play the timeline only for 2.1 seconds? That would require using Javascript's setTimeout() or setInterval() methods - or you could use stop triggers on the timeline to get your playback timing as you want it.

                           

                          100michaelmcleod100 wrote:

                           

                          One question left: When an animation in Edge plays start to finish normally with no triggers.......is it supposed to loop back to the beginning endlessly,

                          or is it normal for it to just end in a stop?

                           

                          Unless you add a trigger at the end of your animation with code telling it to play again, your animation will only play once. If you want it to loop, add a trigger at the last animation transition such as sym.play(0); - this will play the timeline again from time zero, and loop continuously.

                           

                          hth,

                          Joe

                          1 person found this helpful
                          • 10. Re: Stop triggers ignored.
                            100michaelmcleod100 Level 1

                            Hello

                            I was working in Edge some more today and yes, like the nube I am I was thinking in milliseconds but kept putting things like (2.1) instead of (2100), I think I'll be able to remember that now. Sheesh.

                             

                            I also did some tests and found out that if you play an animation beginning to end it indeed just stops; but if you happen to be on the last frame and press play it loops back to the beginning (very courteous) but somehow it just looked like it was looping forever the other day.

                             

                            So, most of my questions have been hammered out except one, I feel that once I find the answer to this everything else will fall into place.

                             

                            Q: How do you definitively STOP the timeline from playing? The following is a list of commands that haven't worked.

                                 1. stop();

                                 2. stop(45);    -for number on the timeline

                                 3. stop("stop");  - for label on the timeline

                                 4. sym.stop();

                                 5. sym.stop(45);

                                 6. sym.stop("stop");

                                 7. play(44);  - to create a loop between two frames to simulate a stop

                                 8. play("loop")  - to create a loop using a label for same purpose.

                             

                            I need someone to really help me with this simple thing; because all the tutorials say these just work....as I well expect them to; but I could put one or all of these on a trigger at the point where I want the timeline to simply stop playing (so I can put a button there and click to proceed to hear some audio if I like) and

                            the timeline will just play and play and play, there's no stopping the train.

                             

                            It seemed to work for awhile today, and when it stopped working correctly I figured I must have moved something wrong; but I checked (didn't take a lot of research, it's a simple stop command placed in a trigger on the timeline) and I can't think of anything else to do.

                            It's amazing how much of Edge is really based on play and stop, without these basics working on a consistent basis, I can't get out of Kindergarten here.

                             

                            As a way of keeping my sanity, I opened a new file just now and created a timeline with a circle moving for 5sec, text that shows up at 2sec that says "stop" , and a trigger right after that (2100) that has - sym.stop()-  and everything works. (so I'm not accusing adobe of making something wrong here, I just keep getting intermittent (seemingly) results when I apply the STOP functions.)

                             

                            Any ideas? Is it placement? Does it not work when there is audio on the timeline? Really any past growing experiences would help.

                            Thanks everybody.

                            MD

                            • 11. Re: Stop triggers ignored.
                              100michaelmcleod100 Level 1

                              I went back and stripped the timeline of all the stop triggers but one (I had experimented with putting a stop trigger every two frames to see if I could get one of them to work), so now I'm back to just one.

                              ....and It seems to work.

                               

                              The sym.play(45); now loops. as well.

                               

                              It seems that you must use only one stop command or they all get invalidated. I'm still not understanding the stop functions, it would seem intuitive that you could put a stop on every frame if you wanted ( which would be ridiculous) but that any frame that was reached would respond with...well stopping.

                              but as I just found, if you use more than one stop on the timeline, the timeline ignores them all and plays to the end.......is this correct?  (these are the results I have gotten, but I certainly don't think that it should be true as I will be needing to stop more than one time on any timeline).

                               

                              Stumbling through the dark to find out definitively how things are supposed to work.

                              Thanks.

                              • 12. Re: Stop triggers ignored.
                                jbowden Adobe Employee

                                Hey MD,

                                 

                                Sounds like you're getting there. Please take a look at the snippets in the Actions panel under Playback and the Adobe Edge Animate CC JavaScript API I mentioned previously for examples on how to use play and stop methods.

                                 

                                To stop playback in general, use:

                                 

                                sym.stop();

                                 

                                To stop at a certain time/label, use:

                                 

                                sym.stop(3000);

                                 

                                or

                                 

                                sym.stop("myLabel");

                                 

                                Remove all triggers that have incorrect code such as stop(), etc. as they will bung up the rest of the code. You must preface these methods with sym. After you call sym.stop(), your timeline won't play again until you call sym.play().

                                 

                                hth,

                                Joe

                                • 13. Re: Stop triggers ignored.
                                  jbowden Adobe Employee

                                  100michaelmcleod100 wrote:

                                   

                                  It seems that you must use only one stop command or they all get invalidated. I'm still not understanding the stop functions, it would seem intuitive that you could put a stop on every frame if you wanted ( which would be ridiculous) but that any frame that was reached would respond with...well stopping.

                                  but as I just found, if you use more than one stop on the timeline, the timeline ignores them all and plays to the end.......is this correct?  (these are the results I have gotten, but I certainly don't think that it should be true as I will be needing to stop more than one time on any timeline).

                                   

                                  You can have more than one stop trigger on a timeline, but as I mentioned, your syntax must be correct: sym.stop()  And of course, it won't play again until you signal sym.play() - again, with correct syntax.

                                  1 person found this helpful
                                  • 14. Re: Stop triggers ignored.
                                    MikeV1234 Level 3

                                    I would like to add that after the last update I have had nothing but problems with Triggers as well. They just plain don't stop.

                                     

                                    I've been using Edge for a few years and am very comfortable with it. Sometimes using a Label will make it work instead but there isn't any consistency I've noticed.

                                    • 15. Re: Stop triggers ignored.
                                      LMallare

                                      I had a problem with simple stop triggers not working in the past and am now experiencing it again. It's pretty frustrating when a lot of time is spent trouble shooting when a program isn't performing its basic functionality correctly.

                                      • 16. Re: Stop triggers ignored.
                                        garybrindley Level 1

                                        I've just posted a question on the stop(); function today also. It's the first and most basic thing you are likely to want to do and it just doesn't. I asked Adobe on Chat and was referred here because it was a "coding issue"! This is ridiculous and very frustrating. On open source stuff, I get you need to refer to forums but Adobe surely must be able to answer such a simple question.

                                         

                                        I have a new project (I tried this with various new project types) that has a script that simply says "stop();" without the quotes, but it doesn't, the playhead just continues.

                                         

                                        Did you get anywhere with this in the end?

                                        • 17. Re: Stop triggers ignored.
                                          ddhayles Level 3

                                          with Javascript you need to add in 'this.' before the stop:

                                           

                                          this.stop();

                                          • 18. Re: Stop triggers ignored.
                                            garybrindley Level 1

                                            Thanks for replying. I tried with both stop(); and this.stop();

                                             

                                            Neither work, There's no other code at all. I tried viewing in Debug as well as just playing in Animate. Never works.

                                            • 19. Re: Stop triggers ignored.
                                              ddhayles Level 3

                                              Where are you placing your code? Do you have a timeline animation?

                                              • 20. Re: Stop triggers ignored.
                                                garybrindley Level 1

                                                I'm adding the code to the Actions layer. I've added a pic of the screen that may help:

                                                 

                                                test-screen.jpg

                                                • 21. Re: Stop triggers ignored.
                                                  ddhayles Level 3

                                                  It looks like you are using Animate CC, this forum is for Edge Animate CC, different software. Try posting your query to the forum below:

                                                   

                                                  Adobe Animate CC

                                                  • 22. Re: Stop triggers ignored.
                                                    garybrindley Level 1

                                                    Ok. I didn't realise Edge Animate even existed any longer. What's the difference?

                                                    • 23. Re: Stop triggers ignored.
                                                      ddhayles Level 3

                                                      Edge Animate is used for creating HTML5 DOM related content.

                                                       

                                                      Animate is used for creating Flash content and HTML5 Canvas Content.

                                                       

                                                      Edge Is still very much alive but is no longer being actively developed by Adobe anymore.

                                                      • 24. Re: Stop triggers ignored.
                                                        jbowden Adobe Employee

                                                        Hi Gary,

                                                         

                                                        The answer is just a bit further up this thread: to stop playback in the timeline, use sym.stop()

                                                         

                                                        The Javascript API for Edge Animate CC is here: Adobe Edge Animate CC JavaScript API

                                                         

                                                        hth,

                                                        Joe