Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Pause and play button not working
- Gamdapiko24
-
57 posts
Pause and play button not working
https://scratch-mit-edu.ezproxyberklee.flo.org/projects/1134263578/editor/
I am making an OS in scratch and am currently working on the music app. I added a pause and play button to play American Boy. It dosen't work.
Please help.
I am making an OS in scratch and am currently working on the music app. I added a pause and play button to play American Boy. It dosen't work.
Please help.
- -Your_Nightmare-
-
10 posts
Pause and play button not working
Can you tell me what you're trying to pause? If you're trying to pause the music try using this
Pause:
Play:
Pause:
set [pitch v] effect to (-100)
Play:
set [pitch v] effect to (100)
- Gamdapiko24
-
57 posts
Pause and play button not working
I'm trying to pause the music that is playing in the “Music App” sprite. When the play button is pressed (after clicking the music app), it should play the song then pause when I press the button.
- HighlaneGamingStudio
-
100+ posts
Pause and play button not working
That wouldn't work because the music would keep playing in the background, even if slowly. What would work better would be this: Can you tell me what you're trying to pause? If you're trying to pause the music try using this
Pause:set [pitch v] effect to (-100)
Play:set [pitch v] effect to (100)
when I receive [pause music v]Low pitch makes the sound slow down, and setting the pitch to a really low number creates the illusion of pausing and playing the audio. I added the volume block so that the computer wouldn't be able to detect the really low pitched slow sound to ensure the illusion stayed.
set [pitch v] effect to (-10000000000)
set volume to (0) %
when I receive [play music v]
set [pitch v] effect to (0)
set volume to (100) %
- NotK3ndricAltAgain
-
100+ posts
Pause and play button not working
Here:
when I receive [pause v]
set [pitch v] effect to ((-1) / (0))
set volume to (0)%
when I receive [play v]
set [pitch v] effect to (0)
set volume to (100)%
- Gamdapiko24
-
57 posts
Pause and play button not working
Thank you so much!That wouldn't work because the music would keep playing in the background, even if slowly. What would work better would be this: Can you tell me what you're trying to pause? If you're trying to pause the music try using this
Pause:set [pitch v] effect to (-100)
Play:set [pitch v] effect to (100)when I receive [pause music v]Low pitch makes the sound slow down, and setting the pitch to a really low number creates the illusion of pausing and playing the audio. I added the volume block so that the computer wouldn't be able to detect the really low pitched slow sound to ensure the illusion stayed.
set [pitch v] effect to (-10000000000)
set volume to (0) %
when I receive [play music v]
set [pitch v] effect to (0)
set volume to (100) %
I haven't even though about using broadcasts.
This worked. Thanks.
- Discussion Forums
- » Help with Scripts
-
» Pause and play button not working