This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-03-13 17:57:58

rukichan
Scratcher
Registered: 2010-12-29
Posts: 29

how to make music play

how do i make it so that when my sprite goes to a certain spot on the background music will play? the sprite is controlled by the arrow keys and i want it to be able to navigate a maze, get to the end, and when it gets there, i want musicto play.


When life gives you lemons, squirt them in your enemy's eyes!
I'm not random, you just can't think as fast as me.

Offline

 

#2 2011-03-13 18:18:36

majormax
Scratcher
Registered: 2008-04-06
Posts: 1000+

Re: how to make music play

First, make a red dot at the end of the maze.
Then put this script:
<when green flag clicked>
<forever if > <touching color[ red
<play sound[ Sound you want to play] until done
<stop script>
<end>

Offline

 

#3 2011-05-09 13:46:10

Sonicnerd14
New Scratcher
Registered: 2011-05-09
Posts: 1

Re: how to make music play

I just wanted to know if this is how you make a song play forever. Because i got the kingdom hearts cloud vs. sephroth, and I want the song to keep playing until the boss part of the level.

Offline

 

#4 2011-05-09 18:50:24

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: how to make music play

Sonicnerd14 wrote:

I just wanted to know if this is how you make a song play forever. Because i got the kingdom hearts cloud vs. sephroth, and I want the song to keep playing until the boss part of the level.

You could do it in a similar way, like this:

Code:

When green flag clicked
Repeat until level = [boss level]
    play sound [sound] until done
End Repeat

http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer