Skip to main content
jessicat83746177
Participating Frequently
February 19, 2019
Answered

How to stop at last frame but keep mouseover button

  • February 19, 2019
  • 1 reply
  • 1675 views

Hi,

Sorry this is a really newbie question as this is one of the first projects I'm building in Animate.

I'm making a HTML 5 banner and cannot figure out how to get it to stop properly. I turned off 'Loop timeline' in publish settings, but then it keeps jumping to the very first (blank) frame of the animation rather than ending on the last frame of animation.

So I added the code "this.stop" to the last frame on the timeline. However, this kills the mouseover action I had on my buttons. I had built different states for my button for it to change color on mouse over, but this doesn't work anymore when the movie freezes on the last frame.

Please any ideas would be much appreciated! Is there a way to tell Animate to stop correctly at the last frame without using 'stop'?

    This topic has been closed for replies.
    Correct answer GoryGreg

    thanks so much for your help! I deleted the camera but still got the same issue.

    When I do Inspect Element and Console, there aren't any error messages.

    I simplified the project and attached it here if it makes things easier.

    WeTransfer

    I do have different colours set for the button in the up, over, down hit states. If you mouseover the button before the movie stops playing, you can see the button works correctly. But once we hit the last frame, only the click works correctly because presumably I had added the event listener code outside of the button at the last frame. I just can't get the mouseover action to work at the last frame (i.e. go to 'Over' Frame at mouseover).

    Thanks so much!


    Thanks for the file.

    I got it to work okay BUT that was after I turned off Advanced Layers on this. When Advanced Layers is on it acts like you described but when I switched it off it worked okay. And this is weird because you say you don't have the option for Advanced Layers on your Animate CC version. So I am confused as to what is happening. I'm wondering if problem connected to the Camera even after you have switched off the camera? Does anyone else work on this file? Can you update your Animate CC?

    I tested it and run okay for me- both on Chrome and Firefox. Even when it stops playing.

    The only other thing I changed in Publish Settings was the Output name just to 'Troubleshooting file' as I was testing it in a test folder on my desktop.

    Here is my saved version of the FLA- try this...

    WeTransfer

    1 reply

    Joseph Labrecque
    Community Expert
    February 20, 2019

    There has to be something else going on, as disabling looping in Publish Settings or this.stop(); should both work. Perhaps the web browser console is throwing an error?

    jessicat83746177
    Participating Frequently
    February 20, 2019

    Thanks so much for your answer. This is the error I get:

    WARNINGS:

    Frame numbers in EaselJS start at 0 instead of 1. For example, this affects gotoAndStop and gotoAndPlay calls. (18)

    Content with both Bitmaps and Buttons may generate local security errors in some browsers if run from the local file system.

    It looks like the first error might be relevant but I don't know how to resolve that.

    If I use this.stop(), it does work and stops at the last frame. But then mouseover on my button doesn't call the over the state.

    Any tips much appreciated!

    jessicat83746177
    Participating Frequently
    February 20, 2019

    Thanks for the file.

    I got it to work okay BUT that was after I turned off Advanced Layers on this. When Advanced Layers is on it acts like you described but when I switched it off it worked okay. And this is weird because you say you don't have the option for Advanced Layers on your Animate CC version. So I am confused as to what is happening. I'm wondering if problem connected to the Camera even after you have switched off the camera? Does anyone else work on this file? Can you update your Animate CC?

    I tested it and run okay for me- both on Chrome and Firefox. Even when it stops playing.

    The only other thing I changed in Publish Settings was the Output name just to 'Troubleshooting file' as I was testing it in a test folder on my desktop.

    Here is my saved version of the FLA- try this...

    WeTransfer


    Thanks so much! Perfect, it works now!!

    I'm so confused, because I built this at home where I had the latest version of Animate and where I probably had Advanced Layers turned on. But I have been testing it here in office where I have an older version of Animate with no advanced layers, and it still wasn't working right.

    So the only thing that fixes it is to take it into the latest version Animate and TURN OFF Advanced Layers to get it working again?

    Maan this software is really difficult to use. But thank you so much for your help you have really saved my day!