Create new clip for sounds:
- Create 3 main frames
- Add action stop() in every frame
- Insert music in the first frame
- Insert gotoAndStop(1); in the second frame
- Insert gotoAndPlay(1); in the third frame
Create Button:
- Create 2 main frames
- Add action stop() in every frame
- Insert OFF button in the first frame
- Insert actions in the OFF button:
-
on (release) {
tellTarget ("../music") {
stopAllSounds();
}
}
on (release) {
nextFrame();
}
Insert ON button in the first frame and the action script:
on (release) {
tellTarget ("../music") {
nextFrame();
}
}
on (release) {
prevFrame();
}
Now place clip with music on the first scene and name it music in instance panel.
Place the button on the main scene.
Press Ctrl+Enter
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5