Skip to main content
Inspiring
February 14, 2024
Question

botao de pause ou codigo snippet para pause

  • February 14, 2024
  • 2 replies
  • 13143 views

ola a todos

estou montando um arquivo com adobe animate

e preciso de um botão de pause(com codigo pronto)

ou codigo snippet de botao pause

nao achei nos presets do adobe animate

alguem pode me ajudar ?

como conseguir e proceder ?

obrigado a todos 

leo

preciso do pause para eventualmente parar no meio do loop 

envio anexo um video screen da situação

    This topic has been closed for replies.

    2 replies

    February 26, 2024

    This post is very late but I think I found a solution and its really simple

    Just press space in the middle of the loop

    Inspiring
    February 26, 2024

    but i want a play/pause button

    February 26, 2024

    Well there is one at the timeline try doing that

    JoãoCésar17023019
    Community Expert
    Community Expert
    February 14, 2024

    Hi.

     

    You need to call the stop method on the target MovieClip instance. Like this:

    import flash.events.MouseEvent;
    
    function stopMovieClip(e:MouseEvent):void
    {
        yourMC.stop();
    }
    
    yourButton.addEventListener(MouseEvent.CLICK, stopMovieClip);



    Regards,

    JC

    Inspiring
    February 24, 2024

    could you tell me whats yourMC in action script you sent

    to me ?

    now i understood of how to deal with the action script and button instance

    regards 

    leo

    kglad
    Community Expert
    Community Expert
    February 24, 2024

    hello man

    how does it work for going  on action script for next and back button in slideshow?

    there are some presets in code snnipets

    but your way has shown me that works better 

    regards 

    leo


    in the button layer add a back or previous button, in addition to the next button.  

     

    add the code:

     

    previous_button.addEventListener(MouseEvent.CLiCK, prevF)

     

    function prevF(e:MouseEvent):void{
    SoundMixer.stopAll();

    prevFrame();

    }