Skip to main content
Participant
May 10, 2021
Question

Code Snippets to stop frame using buttons

  • May 10, 2021
  • 1 reply
  • 202 views

Hello, I'm having some trouble with animate and creating a button. 

 

Step 1: Stop the Animation in frame 1 – using code snippet
• Open your controller.fla file
• Create a new layer, move it to the top of the layer stack
• In frame 1 of the new layer
• Select window/code snippet/HTML5 canvas/timeline navigation
• Select the first option (stop at this frame)
• It inserts the following code into your file: this.stop() NOTE: this tells the browser to stop at this frame and wait for further instructions
Step 2: How to name our buttons
• In Animate, in your controller.fla file
• On the stage- one at a time- repeat the process (click on button- give it a name)
o Click on a button
o In the “object” properties panel, assign it an instance name (no spaces) ex: btn_face, btn_photo, btn_poster,……

    This topic has been closed for replies.

    1 reply

    kglad
    Community Expert
    Community Expert
    May 10, 2021

    what's your question, if any?