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

play/pause button sheet music animation

Contributor ,
Mar 01, 2024 Mar 01, 2024

hello there

i already learnt a lot here in 2 weeds

Actions Scripts for play button, stop button, 

slideshow and more........

i am making a sheet music animation for my students

and in order to understand the sheet music....i need

a play/pause in the animation i attached here....

i have a play, i have a stop, i have a replay(the same as play)

but i need so much a help for the play/pause button action script

anyone help?

regards 

leo

3.1K
Translate
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 124 Replies 124
Community Expert ,
Mar 01, 2024 Mar 01, 2024

again, you need to stream your music IF your sound is added to the timeline.

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

ok ill try

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

but what does it have to do with pausing the line(sheet music line passing) and then continuing from where it 

stoped.......i need so much this

regards 

leo

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

i found this

does this work in animate ?

https://www.youtube.com/watch?v=8V2gP93dfxs

this tutorial shows how to create a 2 in one play / pause button using Flash and Actionscript 3.0 Code + file sample: http://www.onitz.net/ ps. I know its also possible using boolean variables that switch each time, but I prefer this way because its simple and works perfectly
Translate
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 ,
Mar 01, 2024 Mar 01, 2024

just use stop() and play() for the timeline.

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

ok then

i am getting kinda confused sorry

its just the second week doing this

i want to use stop(the line in the middle of the sheet) and replay from where it stopped

how do i proceed 

describe step by step please

thanks for the support 

leo

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

the timeline with the sheet music the same one with the code or a movieclip instance?

Translate
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 ,
Mar 01, 2024 Mar 01, 2024

i did not get the point

the sheet is one layer

the line is one layer with classic tween over the sheet

the play button is in one layere 

the Action Script in another layer with the instance of the play button

what now

thanks for the support

 

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

use:

 

this.play();  //unpause

//and

this.stop();  // pause

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

thanks for the answer

but where ?

describe me

you are the man

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

in your code layer, actions panel, using your instance names for yourpausebutton and yourplaybutton:

 

yourpausebutton.addEventListener(MouseEvent.CLICK,pauseF);

yourplaybutton.addEventListener(MouseEvent.CLICK,playF)

 

function pauseF(e:MouseEvent):void{

this.stop();

}

function playF(e:MouseEvent):void{

this.play();

}

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

again

you are the man

is this for only one button?

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

where do i paste where 

i get the point

give it to me ready to paste

thanks a lot

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

it's for 2 buttons like you showed.  and where to place is explained.

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

thats ok but do i paste this in the same Action Script page?

thanks

 

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

in your code layer, actions panel, using your instance names for yourpausebutton and yourplaybutton, use the code i suggested.

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

ok thanks 

 

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

is it working the way you expect?

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

i will try later

i am busy now

regards 

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

your are amazing

it worked

i deserve you a gift.........

thank you so much

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

you're welcome 

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

how did you find out this ?

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

how'd i learn actionscript 3?

Translate
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 ,
Mar 02, 2024 Mar 02, 2024

hello there

i am intending to make instead of a line moving along the sheet music to place a boy with internal animation walking and move as the music passes by.........how should i proceed ?

Translate
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