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

botao de pause ou codigo snippet para pause

Contributor ,
Feb 14, 2024 Feb 14, 2024

Copy link to clipboard

Copied

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

Views

3.6K

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
replies 101 Replies 101
Community Expert ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

1:

on the first frame, add a layer with your next button and the code* for it.  lock that layer.

create two more layers: one for the pics and one for the music. 

 

2:

at each frame for pics and for music, make it a keyframe (already done for frame 1).

in the pic layer, add your pic

in the music layer, add your music (and make sure its sync propery is event, not stream)

 

3:

in the next frame, for pics and music make it a keyframe.

in that next frame for buttons, do NOT make it a keyframe.

 

4:

repeat step 3 for each pic and music

 

*

for your code, use:

 

import flash.media.SoundMixer;

import flash.events.MouseEvent;

 

this.stop();

your_button_reference.addEventListener(MouseEvent.CLICK, nextF);

 

function nextF(e:MouseEvent):void {

SoundMixer.stopAll();

this.nextFrame();
}

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

p.s. do not attach screenshots to the adobe forums.  copy and paste them into your message.  that makes it a lot easier to check those screenshots (especially, for those of us using mobiles devices when reading the forums).

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

thats ok 

thanks for the support

 

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

what's ok?

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

thank you man

i ll try it later

 

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

got 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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

what is this scheme for ?

for playpause button in the file i am working?

or for a slideshow with music

regards 

leo

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

it's for one button control of a slideshow with music.

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

ok

 

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

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

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

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();

}

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

thanks man

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

but where i am suposed to add ? 

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

hello man

i placed a button to go back but plays more than one mp3 file

it gets all messed up - i put all in EVent

i need your action script instead of using presets inside animate

for button next n back

regards 

leo

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

what's your previous button 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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

the same

preview/ back button
preview.addEventListener(MouseEvent.CLiCK, prevF)

 

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

prevFrame();

}

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

it apears this

Scene 1, Layer 'Layer_9', Frame 1, Line 1, Column 37 1119: Access of possibly undefined property CLiCK through a reference with static type Class.

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

any error messages?

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

the error message is above ..."it appears this...."

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

should be 

 

CLICK

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

wha does it mean?

is it to replace for CLICK instead of CLiCK?

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 ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

yes

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
Contributor ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

hello man 

thank you 

it 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
Community Expert ,
Feb 24, 2024 Feb 24, 2024

Copy link to clipboard

Copied

excellent 

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
Contributor ,
Feb 25, 2024 Feb 25, 2024

Copy link to clipboard

Copied

what about a play/pause button, fo pause in the middle of the music and continue from where its stoped

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